Components
← All components

Listbox

stimeo--listbox

A select-only listbox: open a popup, pick one option, with activedescendant navigation.

  • Listbox

The stimeo--listbox controller implements the WAI-ARIA Listbox pattern in its collapsed (Select-Only Combobox) form. Pressing the combobox trigger opens the listbox; focus stays on the trigger while the active option is tracked with aria-activedescendant rather than by moving DOM focus. ArrowUp/ArrowDown (wrapping), Home/End, and printable-character typeahead move the active option; opening picks the selected option, else the first. Selecting syncs aria-selected, reflects the label into the trigger and the hidden field's value, and dispatches stimeo--listbox:change. Enter/Space select and close; Escape and outside click or Tab close; closing via select/Escape returns focus to the trigger. Static placement is your CSS; dynamic placement is delegated to the opt-in stimeo-ui/positioning.

running
Favorite fruit

Keyboard

KeyAction
Enter / Space / ↓ / ↑ Open the listbox while it is closed.
↓ / ↑ Move the active option while open (wrapping).
Home / End Move to the first / last option.
Printable characters Typeahead to the first option starting with the typed text.
Enter / Space Select the active option and close.
Esc Close without selecting and return focus to the trigger.