ARIA Widget Roles

ARIA role: listbox

Build a form with the HTML form generator

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

NameTypeDescription
roletokenExplicit role token listbox; use only where allowed. Omit when native semantics match.
aria-activedescendantID referenceRelevant 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-multiselectablebooleanRelevant 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>
HTML Reference