combobox-name-present

Comboboxes have an accessible name

automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust

Checks that elements with role="combobox" expose a non-empty accessible name.

Applies to. Applies to elements carrying role="combobox" (the attribute must name that role alone, not a fallback list) that are included in the accessibility tree. An element with the matching implicit role but no role attribute is out of scope.

Expectation. The element has a non-empty accessible name from aria-label, from an aria-labelledby that resolves to non-empty text, or from title. role="combobox" is name-from-author-only, so subtree text is never accepted: text sitting inside a custom combobox widget is not reliably exposed as its name. On a labelable element (<input role="combobox">) an associated <label> counts as well.

Examples

pass
<div role="combobox" tabindex="0" aria-label="Country"></div>

`aria-label` names the combobox.

fail
<div role="combobox" tabindex="0"></div>

No accessible name from any supported mechanism.

View source