Resonance Logo

Listbox

A listbox presents a scrollable list of options and lets users select one or more items using full keyboard navigation and clear selection state.

Demo

Tab into the listbox below and use the Up Arrow and Down Arrow keys to move through the options. Press Space or Enter to select the focused option. In a multi-select listbox, hold Shift while using arrow keys to extend the selection, or use Ctrl + Space to toggle individual items. Observe how focus, selection, and state changes are communicated.

Choose Toppings

Select one or more toppings. Use Space to toggle, Shift+Arrow to select a range, Ctrl+A to select all.

Pepperoni
Mushrooms
Onions
Sausage
Bell Peppers
Olives (unavailable)
Bacon
Pineapple
Spinach
Jalapeños

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Label — A visible label or heading associated with the listbox that tells users what they are selecting from.
  2. Listbox container — The element with role="listbox" that receives keyboard focus and wraps all options.
  3. Options — Individual items with role="option" and an aria-selected attribute reflecting their current selection state.
  4. Focus indicator — A visible highlight on the currently focused option, distinct from the selection highlight.
  5. Selection indicator — A visual treatment (checkmark, background color, or similar) applied to all currently selected options.

Accessibility Behavior

Common Mistakes

Why This Matters

Listboxes are used in scenarios where a native <select> is insufficient — such as multi-select with rich content, reorderable lists, or custom styling requirements. When a custom listbox fails to implement the correct ARIA roles and keyboard patterns, screen reader users encounter a list that appears non-interactive, and keyboard-only users cannot select items at all. Because listboxes are often used for consequential selections — assigning permissions, choosing recipients, or filtering large datasets — inaccessibility here can block users from completing high-priority tasks entirely.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation