ARIA Widget Roles
ARIA role: option
A selectable choice inside a listbox. Prefer option in select. Custom option belongs in listbox, needs a name and appropriate aria-selected or aria-checked state; focus alone is not 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="option"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| role | token | Explicit role token option; use only where allowed. Omit when native semantics match. |
| aria-selected | boolean or undefined | Relevant when applicable. Indicates selection of an item in a widget rather than keyboard focus or the current navigation location. Keep the actual selection model synchronized and use false for selectable but unselected items as appropriate. Values: true, false, undefined. |
| aria-checked | tristate | Relevant when applicable. Reports whether a checkable widget is checked, unchecked, or partially checked. Mixed applies only to roles supporting tri-state behavior; not radio or switch. Keep this in sync with the real state. Native checkbox checked and indeterminate properties are preferable where applicable. Values: true, false, mixed, undefined. |
| aria-posinset | integer | Relevant when applicable. Identifies an item's logical position when not all items in a set are present in the DOM. Pair with aria-setsize and ensure the position does not exceed a known size. Values: positive 1-based position. |
| aria-setsize | integer | Relevant when applicable. Indicates the total number of items in a logical set when only some appear in the DOM. Use -1 for unknown size. Pair with aria-posinset for each rendered member. Values: positive integer or -1. |
Working Example
Example Snippethtml
<label for="size">Size</label><select id="size" size="2"> <option selected>Small</option> <option>Large</option></select>