The menu provides a built-in compliance with WAI-ARIA specifications. The WAI-ARIA support is achieved using the attributes such as aria-orientation, aria-label, aria-expanded, aria-disabled, and aria-haspopup applied for menu item in
menu. It helps the people with disabilities by providing information about the widget for assistive technology in the screen readers. The menu component contains the menubar, menu, and menuItem roles.
This role will be specified for root menu.
This role will be specified for an item that have sub menu.
This role will be specified for an item that do not have sub menus.
Indicates the availability and type of interactive popup element.
Indicates whether the subtree can be expanded or collapsed, and indicates whether its current state can be expanded or collapsed.
Indicates whether the orientation is horizontal or vertical. The default orientation is horizontal.
Indicates the menu item text.
Indicates the state of menu item whether it is disabled.
User interaction with keyboard
Closes the sub menu that contains focus and returns focus to the parent element.
Opens the sub menu if focused menu item has sub menu, and places focus on its first item or activates the item and closes the sub menu.
Navigates up or to the previous menu item.
Navigates down or to the next menu item.
Closes the current sub menu and navigates to the parent menu.