Must haves
Use either the ARIA accordion pattern or disclosure pattern
- The element that controls the expand/collapse functionality is a button
- The button uses the
aria-expanded
attribute to communicate its current state - The button uses the
aria-controls
attribute to reference the container of the expanded content - When the button also serves as a heading, it is wrapped in an appropriate heading element
Learn more about the accessible accordion pattern and disclosure pattern
Visual Example
Do and Don't
Do | Don't |
---|---|
|
Here links are used when buttons are more appropriate, the questions are not wrapped in headings, and there is no programmatic association between the control and the related section since |