Components
← All components

Menubar

stimeo--menubar

An application menubar: roving top items that each open a role=menu, with typeahead.

  • Menubar

The stimeo--menubar controller implements the WAI-ARIA Menubar pattern (single level). The top items form one Tab stop via roving tabindex and the arrow keys move between them; ArrowDown/Enter/Space open a menu (ArrowUp opens it at the last item), the arrow keys then move within the menu (wrapping), Home/End jump to the ends, and printable characters move by typeahead. Pressing ArrowLeft/ArrowRight while a menu is open jumps to the adjacent top menu. Escape closes and returns focus to the owning top item; activating an item, Tab, and an outside click also close. Each top item is linked to its menu by aria-controls/id, so markup order is free. Menu placement is your CSS; dynamic placement is delegated to the opt-in stimeo-ui/positioning.

running

Keyboard

KeyAction
→ / ← Move between top items (wrapping); open the adjacent menu when one is open.
↓ / 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.
Printable characters Typeahead to the next matching item in the open menu.
Esc Close the menu and return focus to its top item.