Accessibility
- Availability of content tree items to assistive technology requires the use of
aria-controls
and togglingaria-expanded
as regions are expanded and collapsed. - The name of each item should include the attribute
role="button"
. - Each tree item
button
is wrapped in an element with roleheading
that has a value set foraria-level
that is appropriate for the information architecture of the page.- If the native host language has an element with an implicit
heading
andaria-level
, such as an HTML heading tag, a native host language element may be used. - The
button
element is the only element inside theheading
element. That is, if there are other visually persistent elements, they are not included inside theheading
element.
- If the native host language has an element with an implicit
- If the accordion panel associated with an accordion header is visible, the header
button
element hasaria-expanded
set totrue
. If the panel is not visible,aria-expanded
is set tofalse
. - The accordion header
button
element hasaria-controls
set to the ID of the element containing the accordion panel content. - “Enter” or “Space” key should expand and collapse items. “Arrow” keys move focus to the next focusable element; tabbing allows the user to move to the main content on the page, and should not navigate through the content tree allowing the user to skip it.
- Avoid keyboard traps when adding components to the content tree. For example, the user expands a section, but is unable to navigate to the next focusable element or to tab out of the content tree panel.
- Although the content tree element passes accessibility testing, content authors are responsible for ensuring the content in the content tree is accessible.
Was this page helpful?
Thanks for your feedback!