-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from WestpacGEL/feature/80-gel-docs-update
fix(#80): list and shadow on the sidebar
- Loading branch information
Showing
18 changed files
with
107 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...e/content/design-system/components/accordion/accessibility/Accessibility API/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- `<div role="tablist">`: Indicates that the element serves as a container for a set of tabs | ||
- `<button aria-controls="{PANEL_ID}" aria-expanded="true|false">`: Identifies a button element that toggles a content collapse and indicates the state of a collapsible element below. The *aria-controls* attribute creates an association between toggle button and collapsible element (panel). | ||
- `<div id="{PANEL_ID}" aria-hidden="false|true">`: The panel must have a unique *id* value. The toggle button *aria-controls* and panel *id* attribute values must match. The panel uses the *aria-hidden* attribute to hide from assistive technologies when no longer available. |
3 changes: 3 additions & 0 deletions
3
...tent/design-system/components/accordion/accessibility/Accessibility features/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- The tabset is implemented as a set of buttons, rather than tabs. This approach has shown to provide a better user experience. | ||
- An indicator outline appears around the toggle buttons when focused | ||
- The tabcordion shape, text and accordion toggle icons are visible in Windows High Contrast Mode |
1 change: 1 addition & 0 deletions
1
...te/content/design-system/components/accordion/accessibility/Keyboard support/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Keyboard users navigate the tabset as a set of buttons, rather than ‘tabs’. Keyboard interaction requires use of ‘tab’ and ‘enter’ (or ‘space’) keys to select, rather than arrow keys. The accordion toggles are also buttons; interaction is as expected, consistent with tabset toggles. |
17 changes: 17 additions & 0 deletions
17
...tent/design-system/components/accordion/accessibility/Notes on accessibility/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
All components comply with WCAG 2.1 AA guidelines and Success Criteria. These fall under the [four principles of accessibility](https://gel.westpacgroup.com.au/design-system/accessibility/design-system-accessibility) – Perceivable, Operable, Understandable and Robust. Below are some specific ways in which this component follows these principles: | ||
|
||
### **Perceivable** | ||
|
||
The Design System components have been designed to adhere to colour contrast ratios for both text and non-text elements. They have been coded to include text alternatives when required, and allow component text and labels to be resized. They do not use colour alone to convey information. | ||
|
||
### **Operable** | ||
|
||
The Design System components have been coded to be navigable using a keyboard and other assistive technologies. WCAG compliance recommends being aware of the time it takes for people to complete tasks and to not automatically move focus. Animation should be controlled and simple so as not to cause seizures, and it’s important to provide the ability to perform the same task in multiple ways where possible. These rules have been followed where navigation and interaction is included in Design System components or patterns. | ||
|
||
### **Understandable** | ||
|
||
WCAG compliance requires consistent and predicable interactions, clear and simple language, concise labels, no jargon or abbreviations and clear error messaging. These rules have been followed where content and interactions are included in Design System components or patterns. | ||
|
||
### **Robust** | ||
|
||
All Design System components have been coded so they can be clearly announced, understood and navigated using all modern assistive technologies. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
apps/site/content/design-system/components/accordion/design/Dos and don’ts/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Avoid using too much content and consider smaller viewports when designing responsive web apps. | ||
- Avoid changing the styles of Tabs and Accordions (border, colour, size etc ) | ||
- Do use Tabs and Accordions on any background (light or dark). | ||
- Avoid making Tab and Accordion labels too long. Although they will wrap the interface will become cluttered very quickly. |
7 changes: 7 additions & 0 deletions
7
apps/site/content/design-system/components/accordion/design/Tabset/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
\**Default tabset: **See Visual design for the usage recommendations for the default style. Tabsets can appear both ranged to the right, or justified. | ||
|
||
```tsx | ||
|
||
``` | ||
|
||
\**Lego tabset: **See Visual design for the usage recommendations for the lego style. Tabsets can appear both ranged to the right, or justified. |
9 changes: 9 additions & 0 deletions
9
apps/site/content/design-system/components/accordion/design/User experience/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Tabcordion component has three modes: | ||
|
||
1. **Tabset** – traditional horizontal tabs, allowing only one content panel to be visible at a time, by selecting the relevant tab. | ||
1. **Accordion** – collapsible content containers, allowing multiple content panels to be visible simultaneously, by selecting the relevant bar. | ||
1. **Tabcordion** – a responsive combination of the first two. | ||
|
||
The first two modes function in the traditional way. The third ‘Tabcordion’ is the term we use to describe a responsive tab set. When using a Tabset in our web applications we typically experience layout issues when the application needs to display on small viewports (phones). Often the tabs won’t fit horizontally in the limited screen size. To remedy this problem, we developed the Tabcordion where the Tabset will turn into an Accordion when viewed on smaller devices (phones). | ||
|
||
This component is useful when trying to simplify and group content for users to view when they need it, as opposed to displaying everything at once. |
7 changes: 7 additions & 0 deletions
7
apps/site/content/design-system/components/accordion/design/Visual design/content.mdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Tabset, Accordions and Tabcordions, can have one of two styles applied to them *Default* and *Lego*: | ||
|
||
The **Default style** is designed to be subtle and understated while still providing a clear indication of which tab or accordion bar is selected, and its related content. To further reinforce this relationship a transition is used to display related content when a tab or accordion bar is selected. Generous padding provides a larger hit area and important breathing space to provide emphasis without adding noise. | ||
|
||
The **Lego tabset** is designed to be more prominent. This design came out of a project request for a more emphasised component which would also add some brand colour to an otherwise dry, text heavy interface. | ||
|
||
Tab sets and accordions are intended to visually group related content. When used correctly with moderate content they do this extremely well. However, if too much content is used it becomes difficult to visualise this relationship as content extends below the viewport. |
16 changes: 16 additions & 0 deletions
16
apps/site/content/design-system/components/accordion/index.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
name: Accordion | ||
description: >- | ||
Tabcordions are grouped sets of tabbed or accordion style panels. Use them to | ||
group and simplify large amounts of content such as product information. | ||
pageOfContent: [] | ||
design: | ||
- title: Tabset | ||
- title: User experience | ||
- title: Visual design | ||
- title: Dos and don’ts | ||
accessibility: | ||
- title: Notes on accessibility | ||
- title: Accessibility features | ||
- title: Keyboard support | ||
- title: Accessibility API | ||
relatedInformation: | ||
- components/panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
changelog: https://github.com/WestpacGEL/GEL-next/bloc/main/CHANGELOG.ms | ||
changelog: https://github.com/WestpacGEL/GEL-next/bloc/main/CHANGELOG.md | ||
currentVersion: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/site/src/components/document-renderer/paragraph/paragraph.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { styles } from './paragraph.style'; | ||
import { type ParagraphProps } from './paragraph.types'; | ||
|
||
export const Paragraph = ({ children, textAlign }: ParagraphProps) => { | ||
return <p className={styles({ textAlign })}>{children}</p>; | ||
export const Paragraph = ({ children, textAlign, className }: ParagraphProps) => { | ||
return <p className={styles({ textAlign, className })}>{children}</p>; | ||
}; |