- Home
- Primitives
- Accordion
- Accessibility
Accordion
Keyboard, focus, semantic, and consumer responsibilities for Accordion.
Accessibility
Data attributes
Accordion emits data attributes for styling and state-based decisions:
| Attribute | Values | Description |
|---|---|---|
data-scope | "accordion" | Identifies the element as belonging to the Accordion primitive |
data-part | "root", "item", "trigger", "content" | Identifies the specific part |
data-state | "open", "closed" | Present on Item; reflects expanded state |
data-expanded | "true", "false" | Present on Trigger; mirrors expanded state |
data-disabled | "" or absent | Present when the item is disabled |
Accessibility contract
Keyboard
- ArrowDown
- Moves focus to the trigger of the next item.
- ArrowUp
- Moves focus to the trigger of the previous item.
- Home
- Moves focus to the trigger of the first item.
- End
- Moves focus to the trigger of the last item.
- Space or Enter
- Toggles the expanded state of the focused item.
- Tab
- Moves focus out of the accordion trigger group.
Focus
- Focus is confined to triggers within the accordion trigger group.
- After opening or closing an item, focus remains on the trigger.
Semantics
- Root renders as a group of accordion items.
- Trigger has role button and controls the expanded state of its item.
- Content has role region and is hidden from assistive technology when collapsed.
ARIA
- Trigger has aria-expanded reflecting the open/closed state of its item.
- Trigger has aria-controls pointing to the id of its content element.
- Content has aria-labelledby pointing to the id of its trigger element.
Consumer responsibilities
- Provide a unique, descriptive label for each Trigger.
- Ensure Content is meaningful when announced by assistive technology.
- Use collapsible for accordions where no item needs to remain permanently open.
Review status: Draft — not yet reviewed
This contract describes what the primitive guarantees. Consuming products remain responsible for labels, layout, and workflow decisions that affect the final accessibility result.
Automated evidence
Axe scan summary
- Passes
- 8
- Violations
- 0
- Incomplete
- 0
Latest executed scan: Aug 13, 2026, 10:47 PM
Evidence IDs: axe-accordion-scan-v1
Automated checks cover only the recorded fixture and do not establish complete accessibility conformance.