WAI-ARIA
- Roles: define what an element is or does.
- role=”menubar” Identifies the element as a container for a set of menuitem elements.
- role=”menu” Identifies the element as a menu container for a set of menu items.
- role=”menuitem” Identifies the element as a menu item.
- role=”menu” Identifies the element as a menu container for a set of menu items.
- Properties: it’s used to give them extra meaning or semantics.
- aria-label: to describe label for non-text content (close icon).
- aria-controls: the relationship between tabs and tab panels.
- aria-expanded: Indicates the submenu is open or not.
- aria-labelledby: provides the user with a recognizable name of the tab.
- States: define the current conditions of elements.
- aria-hidden: to indicates that the element and all of its descendants are not visible or perceivable.
- aria-haspopup: Indicates the menuitem has a submenu.
Extra Info
- To access all menu items by tab.
- Highlight and underline when item is on focus.
- Close submenu by leave focus or press escape key.