Accordion accessibility requirements
Adaptability
Helping people by honouring user preferences and by allowing adaptations to content presentation and time limits.
View test scenarios: Adaptability
| Standard | Description |
|---|---|
| 1.3.4 Orientation, Level AA |
Content is not restricted to a single orientation, unless it's essential |
| 1.4.4 Resize Text, Level AA |
Text can scale up to 200% without loss of content or functionality |
| 1.4.10 Reflow, Level AA |
Content reflows without horizontal scrolling when the viewport is 320px wide |
| 1.4.12 Text Spacing, Level AA |
No loss of content occurs when line, letter or word spacing is increased |
| 1.4.8 Visual Presentation, Level AAA |
Content adjusts as expected when people apply their preferences for text colour, width, alignment, spacing, and size |
| Recommendation | Content and information remain visible and understandable when using high contrast themes |
| Recommendation | Collapsed sections are shown when the page is printed, without the Show all sections button |
Animation and movement
Helping people to limit animation or reduce motion within content.
No component-specific requirements
Assistive technologies and semantics
Helping people who use a screen reader or other assistive tech by using appropriate code.
View test scenarios: Assistive technologies and semantics
| Standard | Description |
|---|---|
| 1.3.2 Meaningful Sequence, Level A |
The order of content in the accessibility tree matches the logical reading order |
| 2.5.3 Label in Name, Level A |
Each trigger, and the Show all sections button, has an accessible name that matches or includes the visible label |
| 3.1.2 Language of Parts, Level AA |
If any of the text in the accordion component is in a language other than the language of the page, the correct language is declared for it using the lang attribute |
| 4.1.2 Name, Role, Value, Level A |
Each trigger, and the Show all sections button, has an accessible name |
| 4.1.2 Name, Role, Value, Level A |
Each trigger, and the Show all sections button, has a role of button |
| 4.1.2 Name, Role, Value, Level A |
The expanded or collapsed state of each section is conveyed to screen readers |
| 4.1.2 Name, Role, Value, Level A |
The expanded or collapsed state of the Show all sections button is conveyed to screen readers |
| 4.1.2 Name, Role, Value, Level A |
The Show all sections button's state and accessible name change to describe what it will do, once every section is expanded or collapsed |
| Recommendation | Each trigger is associated with the content it controls, using the aria-controls attribute |
| Recommendation | Markup can be parsed without errors |
Colour and contrast
Helping people who struggle with colour perception or low vision.
View test scenarios: Colour and contrast
| Standard | Description |
|---|---|
| 1.4.3 Contrast (Minimum), Level AA |
All text in the accordion component has a contrast ratio of at least 4.5:1 against the background colours. This applies in default, hover, focus, expanded, and collapsed states |
| 1.4.11 Non-text Contrast, Level AA |
Any icons (such as a chevron or arrow) used to indicate the state of a section, or what the Show all sections button will do, have a contrast ratio of at least 3:1 against the background |
| 1.4.11 Non-text Contrast, Level AA |
If the triggers or the Show all sections button have a custom focus style, this must have a contrast ratio of at least 3:1 against the background |
| 1.4.6 Contrast (Enhanced), Level AAA |
All text in the accordion component has a contrast ratio of at least 7:1 against the background colours |
Consistency and predictability
Helping people by keeping functionality and content consistent and predictable.
View test scenarios: Consistency and predictability
| Standard | Description |
|---|---|
| 3.2.1 On Focus, Level A |
When a trigger or the Show all sections button receives keyboard focus, it does not initiate a change of context |
| 3.2.2 On Input, Level A |
Expanding or collapsing sections, one at a time or all at once, does not result in an unexpected change of context |
| Recommendation | The down-pointing chevron/icon is to the left of each trigger's label, and of the Show all sections button's label |
| Recommendation | In the one at a time variant, activating the open section collapses it, leaving no section open |
Images and media
Helping people to access (and remove distractions caused by) image, video and audio content.
View test scenarios: Images and media
| Standard | Description |
|---|---|
| 1.1.1 Non-text Content, Level A |
If a trigger or the Show all sections button uses an icon without a visible text label, the icon has a text description; if a visible text label is also present, the icon is hidden from screen readers |
Input assistance
Helping people to complete forms, enter data and pass authentication.
No component-specific requirements
Keyboard
Helping people who use a keyboard.
| Standard | Description |
|---|---|
| 2.1.1 Keyboard, Level A |
Each trigger, and the Show all sections button, can be focused using the Tab key |
| 2.1.1 Keyboard, Level A |
Each trigger, and the Show all sections button, can be activated using the keyboard (typically Enter or Space) |
| 2.1.2 No Keyboard Trap, Level A |
The accordion component does not trap focus |
| 2.4.3 Focus Order, Level A |
The Show all sections button, the triggers, and the content of expanded sections receive focus in a logical order |
| 2.4.7 Focus Visible, Level AA |
Each trigger, and the Show all sections button, has a visible focus indicator when it receives keyboard focus |
| 2.4.11 Focus Not Obscured (Minimum), Level AA |
Each trigger, and the Show all sections button, is not fully hidden by other content when it receives keyboard focus |
| 2.1.3 Keyboard (No Exception), Level AAA |
The accordion component is accessible by keyboard, with no exceptions |
| 2.4.12 Focus Not Obscured (Enhanced), Level AAA |
Each trigger, and the Show all sections button, is fully visible when it receives keyboard focus |
| 2.4.13 Focus Appearance, Level AAA |
If the accordion component uses a custom focus style, this has a solid 2 pixel thick perimeter, or equivalent, and a contrast ratio of at least 3:1 against the background colour |
| Recommendation | A custom focus style is used instead of the browser's default, which can be hard to see against some backgrounds |
Pointer and touch
Helping people use single pointer or touch interactions.
View test scenarios: Pointer and touch
| Standard | Description |
|---|---|
| 2.5.2 Pointer Cancellation, Level A |
Each trigger, and the Show all sections button, is activated on the up event, not on the down event |
| 2.5.8 Target Size (Minimum), Level AA |
Each trigger, and the Show all sections button, has a target area size, or a target area size together with spacing, of at least 24 by 24 CSS pixels |
| 2.5.5 Target Size (Enhanced), Level AAA |
Each trigger, and the Show all sections button, has a target area size of at least 44 by 44 CSS pixels |
Text comprehension (optional)
Helping people to read and understand text content.
No component-specific requirements