ARIA role missing required parent (aria-required-parent)

The aria-required-parent rule flags an element whose ARIA role only exists inside a particular container – a tab, an option, a menuitem, a listitem – but that is not inside it. Assistive technology then announces an item of nothing: no count, no position, no way to move to its siblings. The fix is to wrap the items in the container role they belong to, or to drop their roles.

What the rule means

WAI-ARIA defines a "required context role" for some roles: the container they must sit in. Common pairs:

  • tab → inside tablist
  • option → inside listbox (or a group inside one)
  • menuitem, menuitemcheckbox, menuitemradio → inside menu, menubar or a group inside one
  • listitem → inside list (or a native <ul> / <ol>)
  • row → inside table, grid, treegrid or a rowgroup

The rule fails when such an element's nearest ancestor with a role is not one of its allowed containers. Elements in between with no role – plain <div>s – are ignored. The container can also claim the item with aria-owns.

Who is affected

Screen reader users. An option inside a listbox is announced with its position ("2 of 5") and can be reached with the arrow keys; an option on its own is announced as an option of nothing, and the arrow-key navigation the role promises does not exist. The whole widget reads as broken.

Why the check fails

  • Roles copied onto items while the container keeps no role – a <ul> of role="menuitem" links with no role="menu".
  • A wrapper with its own role between container and items, for example a <section> with a name or a role="region".
  • Items rendered in a portal – a dropdown's options appended to the end of <body>, away from their listbox.
  • Mixed patterns: role="tab" used for a set of buttons that are not tabs at all.
  • Templates where the container is conditional and the items are not.

How to fix it

Put the items inside the container role they need.

<!-- Before: options with no listbox around them -->
<div class="dropdown">
  <div role="option" aria-selected="true">Standard delivery</div>
  <div role="option" aria-selected="false">Express delivery</div>
</div>
<!-- After: the listbox that gives the options their meaning -->
<div class="dropdown" role="listbox" aria-label="Delivery">
  <div role="option" aria-selected="true">Standard delivery</div>
  <div role="option" aria-selected="false">Express delivery</div>
</div>

A listbox also needs keyboard support: focus on the listbox or its active option, arrow keys to move, and aria-selected kept in step. For a simple choice, native <select> or radio buttons give you all of that without ARIA.

How to test it manually

  1. In the browser's developer tools, select the item in the accessibility tree and check its parent's role.
  2. With a screen reader, move onto one item. Does it announce its position within the group?
  3. Use the arrow keys. Can you move between the items as the pattern promises?
  4. Open dropdowns and menus that render their items elsewhere in the page, and check them open.

1.3.1 Info and Relationships, Level A. Related: 4.1.2 Name, Role, Value, because a role that cannot work where it is placed tells assistive technology something untrue.

How Reviseberg reports it

Reviseberg runs aria-required-parent on every crawled page. The issue list shows the rule with its severity, WCAG 1.3.1, the number of affected elements and pages, and the points a fix gets you back; the detail view shows each item's selector and HTML snippet. Several items of one widget usually come from one component, so fixing the component clears them together. Dropdown options that are only rendered once the dropdown opens are not in the page axe checks, so they are neither found nor passed – open them and test by hand.

  • undefined – the reverse: a container without its items.
  • undefined – a native <li> outside a list.
  • undefined – attributes the role does not support.

Check your widgets – get a free scan

Frequently asked questions

Can there be a <div> between the listbox and its options?

Yes, as long as it has no role of its own. The rule looks at the nearest ancestor that has a role.

My dropdown renders its options at the end of <body>. What now?

Use aria-owns on the listbox to claim them, or render them inside the listbox. Both restore the relationship.

Is role="listitem" inside <ul> fine?

Yes. A native list counts as the list container, although <li> already carries the role.

Sources

  1. W3C, Understanding SC 1.3.1 Info and Relationships – https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships
  2. Deque University, axe-core 4.13 rule aria-required-parent – https://dequeuniversity.com/rules/axe/4.13/aria-required-parent
  3. W3C, WAI-ARIA 1.2: Required Context Role – https://www.w3.org/TR/wai-aria-1.2/#scope
  4. W3C, ARIA Authoring Practices Guide: Listbox Pattern – https://www.w3.org/WAI/ARIA/apg/patterns/listbox/

See what a scan finds on your site

One page in about thirty seconds, no email needed. The full report covers up to 100 pages and a keyboard journey.