This content is revealed using the native HTML details/summary element.
- It is keyboard-accessible by default.
- It can be nested within other content easily.
- Screen readers announce its expanded/collapsed state.
Below are different expand/collapse widgets. Each widget is wrapped in a container with an "example" class. The controlled content container uses the "details" class.
Uses the built-in details element with a summary.
This content is revealed using the native HTML details/summary element.
A button toggles visibility of a controlled content container.
This region is controlled by the button above using ARIA attributes.
It receives focus on first focusable element when opened.
Only one section opens at a time in this group.
An overview with a quick summary of the accordion interface.
More in-depth information is provided in this section.
Useful references and links: