- The element that opens the menu has role
- The element with role
aria-haspopupset to either
- When the menu is displayed, the element with role
true. When the menu is hidden, it is recommended that
aria-expandedis not present. If
aria-expandedis specified when the menu is hidden, it is set to
- The element that contains the menu items displayed by activating the button has role
- Optionally, the element with role
buttonhas a value specified for
aria-controlsthat refers to the element with role
- With focus on the button, “Enter” or “Space” opens the menu and places focus on the first menu item. Up and down arrows move focus through menu items.
The WAI ARIA standard defines an actual
role="menu" widget, but this is specific to application-like menus which trigger actions or functions. ARIA menus can only contain menu items, checkbox menu items, radio button menu items, radio button groups, and sub-menus.
Modus Bootstrap’s dropdowns, on the other hand, are designed to be generic and applicable to a variety of situations and markup structures. For instance, it is possible to create dropdowns that contain additional inputs and form controls, such as search fields or login forms. For this reason, Modus Bootstrap does not expect (nor automatically add) any of the
aria- attributes required for true ARIA menus. Authors will have to include these more specific attributes themselves.