Elements with an ARIA [role] that require children to contain a specific [role] have all required children

Interactive groups contain all the child elements they need to work correctly.

On this page

Impact

ScanGov impact ratings

About

Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions.

Risks

Screen readers cannot navigate grouped elements like menus or lists.

Why it's important

Ensures assistive technologies like screen readers can correctly interpret and announce page elements to users with disabilities.

User stories

As a screen reader user, I want ARIA attributes to be correctly implemented so that I can understand the purpose and state of interactive elements.

Code

Failing pattern:

<!-- Fail: listbox missing required option children -->
<ul role="listbox"></ul>

Passing pattern:

<!-- Pass: listbox contains option children -->
<ul role="listbox">
  <li role="option">Alabama</li>
  <li role="option">Alaska</li>
</ul>

Error

ScanGov messaging when a site fails a standard:

Failed: Elements with an ARIA [role] that require children to contain a specific [role] have all required children

Guidance

Indicators

On this page