Components
← All components

Context Menu

stimeo--context-menu

A right-click menu at the pointer with roving focus and keyboard activation.

  • Menu

The stimeo--context-menu controller implements the WAI-ARIA Menu pattern; the only differences from a menu button are the trigger (a contextmenu event or Shift+F10 / ContextMenu key, not a click) and showing the menu at the pointer. It suppresses the native browser menu and reflects the click coordinate as the CSS custom properties --stimeo-context-menu-x/-y on the menu, so the consumer's CSS can place it standalone (no positioning module required); viewport-edge flip/shift is delegated to the opt-in stimeo-ui/positioning module. On open, focus moves to the first item; arrow keys rove (wrapping), Home/End jump, activating an item or Escape closes and restores focus to the region, and Tab closes without restoring.

running
Right-click here for actions

Keyboard

KeyAction
Shift+F10 / ContextMenu Open the menu from the focused region (at its center).
↑ / ↓ Move focus to the previous / next item (wrapping).
Home / End Move focus to the first / last item.
Enter / Space Activate the focused item and close (native button).
Esc Close the menu and return focus to the region.
Tab Close the menu; focus moves on naturally.