Forms
Select elements need a name
- Rule:
select-name - Severity: Critical
- WCAG level A
Why it matters
A dropdown with no label is announced as "combo box, Germany" — the current value, with no clue what it selects.
How to fix it
- Add <label for="..."> matching the select id.
- Where the design has no visible label, use aria-label.
- A first option reading "Choose a country" is not a label: it disappears once anything is selected.
In markup
<select id="country">...</select><label for="country">Country</label>
<select id="country">...</select>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 4.1.2 Name, Role, Value (opens in new tab) — WCAG level A
Further reading
Deque University on select-name (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.