Accessibility Wiki

A submenu trigger must expose aria-expanded

Rule menuitem-haspopup-expanded · Component patterns (best practice) · impact serious · Static + live

↩ Back to the rules index · WCAG cross-reference

Why it matters

A menuitem that opens a submenu advertises it with aria-haspopup. Without aria-expanded, assistive technology cannot tell whether the submenu is open or closed.

How to fix

Add aria-expanded (true/false) to any menuitem that has aria-haspopup, and keep it in sync.

Example

✕ Fails
<div role="menuitem" aria-haspopup="true">More</div>
✓ Passes
<div role="menuitem" aria-haspopup="true" aria-expanded="false">More</div>

WCAG success criteria

4.1.2 Name, Role, Value — Level A

Every UI component must expose a correct name, role, and (where relevant) state/value to assistive technology.

Understanding 4.1.2

Standards

This rule contributes to the following standards:

WCAG A EN 301 549 Best practice

Standard Criteria
EN 301 549 9.4.1.2

References