ARIA Widget Roles
ARIA role: listbox
A selection widget containing options. Prefer native select for simple selection. Custom listbox needs options, name, selected state and arrow navigation; distinguish focus from selection. The example demonstrates a native equivalent or preferred alternative and deliberately omits redundant ARIA. Explicit roles do not implement visual presentation, interaction or focus management; verify allowed role/element combinations in ARIA in HTML. Accessibility exposure varies with browser, platform and assistive technology. Test relevant combinations; rendering is not proof of accessibility.
Formal Syntax & Structure
html syntaxhtml
role="listbox"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| role | token | Explicit role token listbox; use only where allowed. Omit when native semantics match. |
| aria-activedescendant | ID reference | Relevant when applicable. Keeps DOM focus on a composite or controlling input while reporting a particular descendant as active. Update it as keyboard navigation changes the active item; ensure the reference meets the ownership rules. It does not move DOM focus or scroll the active item into view. Values: ID of active owned or controlled item. |
| aria-multiselectable | boolean | Relevant when applicable. Indicates that more than one item can be selected in a composite widget. Keep each item's selection state synchronized and implement its multi-selection interaction. Prefer select multiple for simple lists. Values: true, false. |
Working Example
Example Snippethtml
<label for="tea">Tea</label><select id="tea" size="3"> <option>Mint</option> <option>Black</option> <option>Green</option></select>