Dropdown

A layered menu surface for grouped actions and navigation. Uses Floating UI positioning, supports nested submenus, and accepts custom trigger content via slot.

Keyboard interaction

KeyAction
Tab / Shift + TabMove focus into and out of the trigger and menu items.
Enter / SpaceOpen or close the menu from the trigger.
ArrowDownOpen menu and move focus to first item. In menu, move to next item.
ArrowUpIn menu, move to previous item.
Home / EndJump focus to first/last interactive item in the open menu.
EscapeClose current menu and move focus back to trigger.
ArrowRightOpen submenu when submenu mode is enabled.
ArrowLeftClose submenu and return focus to submenu trigger.

Screen reader behaviour

Dropdown trigger exposes aria-haspopup="menu" and keeps aria-expanded in sync with open state. The panel renders with role="menu".

Attribute / PropertyValue / Behaviour
Trigger aria-haspopupmenu
Trigger aria-expandedtrue | false based on open state
Trigger aria-disabled"true" when disabled
Panel rolemenu
Items rolemenuitem (recommended on custom items)

WCAG 2.2 compliance

2.1.1 Keyboard — APass

All core menu actions (open, close, move focus, select) are operable by keyboard.

2.4.3 Focus Order — APass

Focus progression in trigger and menu remains predictable with arrow-key support.

2.4.7 Focus Visible — AAPass

Interactive trigger and menu items expose visible focus styles.

4.1.2 Name, Role, Value — APass

Menu semantics are exposed via role and aria-expanded synchronization.