Components
← All components

Menubar

stimeo--menubar

An application menubar: top items you walk sideways, each opening a menu, with typeahead.

  • Core
  • Menubar

An application menubar, implementing the WAI-ARIA Menubar pattern at a single level. Tab stops on the bar once, and the left and right keys move between the top items. Down, Enter or Space opens a menu, and opening with Up starts at its last item. Inside a menu the up and down keys wrap around, Home and End jump to the ends, and typing a character jumps to the item starting with it. Pressing left or right with a menu open moves to the neighbouring menu. Esc closes and returns focus to the item that owned it, and so do activating an item, Tab, and a click outside. Unavailable and hidden entries are skipped by the arrow keys. Each top item names its menu in the markup, so the markup order is free. Placement here is this demo's CSS.

running

Keyboard

KeyAction
→ / ← Move between top items (wrapping); open the adjacent menu when one is open. Under RTL the two swap.
↓ / Enter / Space Open the focused top item's menu at the first item (ArrowUp: last item).
↓ / ↑ Move within the open menu (wrapping).
Home / End Move to the first / last item; open the first / last menu when one is open.
Printable characters Typeahead to the next matching item; repeat a character to cycle through matches.
Enter / Space (menu item) Run the item and close the menu.
Esc Close the menu and return focus to its top item.
Tab Close the menu; focus moves on to the next element (it is not sent back).