

Tab: Moves focus to the next element in the tab sequence, and if the item that had focus is not in a menubar, closes its menu and all open parent menu containers.Escape: Close the menu that contains focus and return focus to the element or context, e.g., menu button or parent menuitem, from which the menu was opened.Any key that corresponds to a printable character (Optional): Move focus to the next menu item in the current menu whose label begins with that printable character.End: If arrow key wrapping is not supported, moves focus to the last item in the current menu or menubar.Home: If arrow key wrapping is not supported, moves focus to the first item in the current menu or menubar.Moves focus to the previous menuitem in the menubar.When focus is in a submenu of an item in a menubar, performs the following 3 actions:.When focus is in a submenu of an item in a menu, closes the submenu and returns focus to the parent menuitem.When focus is in a menubar, moves focus to the previous item, optionally wrapping from the last to the first.Note that if the menubar were not present, e.g., the menus were opened from a menubutton, Right Arrow would not do anything when focus is on an item that does not have a submenu. Moves focus to the next menuitem in the menubar.Įither: (Recommended) opens the submenu of that menuitem without moving focus into the submenu, or opens the submenu of that menuitem and places focus on the first item in the submenu.Closes the submenu and any parent menus.When focus is in a menu and on an item that does not have a submenu, performs the following 3 actions:.When focus is in a menu and on a menuitem that has a submenu, opens the submenu and places focus on its first item.When focus is in a menubar, moves focus to the next item, optionally wrapping from the last to the first.When focus is in a menubar, does nothing.When focus is in a menu, moves focus to the previous item, optionally wrapping from the first to the last.When focus is in a menu, moves focus to the next item, optionally wrapping from the last to the first.When focus is on a menuitem in a menubar, opens its submenu and places focus on the first item in the submenu.

#Stack menu olympia code#
To see what is expected of one, take a look at the WAI-ARIA Authoring Practices item 2.14 Menu or Menu bar.īy invoking this kind of menu, you are telling a skilled user of a screen reader that it will behave just as an operating system menu, which means you need to honor the keyboard commands below (so you have to code them all, ARIA does not just make a browser honor them). Now that being said, I suspect that you do not really want an operating-system-style menu. That is the item that performs the function of the menu item (linking to another view or page or state).

If you are genuinely applying an operating-system-style menu to an application, then you want to put the role on the.
