Select without a label (select-name)

The select-name rule flags <select> drop-downs that have no accessible name, so a screen reader announces "combo box, Relevance" without saying what is being chosen. The fix is a visible <label> connected to the select with for and id, or wrapped around it.

What the rule means

A drop-down needs a name that says what the choice is about – "Sort by", "Country", "Size". The option currently selected is the value, not the name. The rule passes a <select> that gets its name from:

  • a <label> whose for matches the select's id, or a <label> wrapped around it,
  • aria-label or aria-labelledby,
  • a title attribute.

It fails a select with none of these, and one whose only label is hidden with display: none. Unlike text fields, a select has no placeholder to fall back on, so a missing label shows up here even on forms whose text fields pass undefined.

The rule only checks that there is a name. "Select" or "Please choose" as the label passes, and says nothing – that part is a judgement, which is why the fact box above says "partly".

Who is affected

Blind people using a screen reader hear the current option and nothing else – "Relevance" means little without "Sort by". Voice-control users cannot say "click Country" when the drop-down has no name. People with cognitive disabilities lose track of which filter is which when several unlabelled drop-downs sit in a row, as they often do on shop category pages.

Why the check fails

  • Filter and sort bars on shop category pages, where the drop-downs sit side by side with a heading or no text at all.
  • The first option used as the label – <option>Choose a country</option> – with no real label.
  • Custom-styled drop-downs that hide the native <select> behind a replacement but leave it in the accessibility tree without a name.
  • Date-of-birth fields split into three selects (day, month, year) under one visible text that labels none of them.
  • Language and currency switchers in the header or footer.
  • Form plugins that print the label text in a <div> above the field.

How to fix it

  1. Give every select a visible label and connect it with for and id.
  2. For a group of selects that share one visible heading – day, month, year – wrap them in a <fieldset> with a <legend>, and give each select its own short label.
  3. Fix it in the filter bar or form component, not page by page.
<!-- Before: the text sits beside the select, but nothing connects it -->
<span class="sort-bar__label">Sort by</span>
<select class="sort-bar__select" name="sort">
  <option value="relevance">Relevance</option>
  <option value="price-asc">Price, low to high</option>
  <option value="newest">Newest first</option>
</select>
<!-- After: the label is tied to the select with for and id -->
<label class="sort-bar__label" for="sort-order">Sort by</label>
<select class="sort-bar__select" id="sort-order" name="sort">
  <option value="relevance">Relevance</option>
  <option value="price-asc">Price, low to high</option>
  <option value="newest">Newest first</option>
</select>

Three selects under one question get a fieldset, and each select still gets a name:

<fieldset class="dob">
  <legend>Date of birth</legend>
  <label for="dob-day">Day</label>
  <select id="dob-day" name="dob-day"><option>1</option><option>2</option></select>
  <label for="dob-month">Month</label>
  <select id="dob-month" name="dob-month"><option>January</option><option>February</option></select>
  <label for="dob-year">Year</label>
  <select id="dob-year" name="dob-year"><option>1990</option><option>1991</option></select>
</fieldset>

How to test it manually

  1. Click on the text next to each drop-down. If the drop-down does not get focus, the two are not connected.
  2. Select the drop-down in your browser's accessibility inspector (Chrome, Edge, Firefox): the "Name" should match the visible text, not the selected option.
  3. With a screen reader (NVDA on Windows, VoiceOver on macOS), Tab to each drop-down and listen: do you hear what is being chosen as well as the current value?
  4. Check that the label says something: "Please choose" names nothing.

The rule is mapped to three criteria, and a drop-down without a name usually touches all three: 1.3.1 Info and Relationships, because the link between the visible text and the select is not in the code; 3.3.2 Labels or Instructions, because nobody is told what to choose; and 4.1.2 Name, Role, Value, because the control has no name. All three are Level A. Related: 2.5.3 Label in Name – the name in the code must contain the visible label's words.

How Reviseberg reports it

Reviseberg runs select-name on every crawled page at 1280px. The issue list shows the rule with its severity, its WCAG criteria and level, the number of drop-downs and pages affected, and the points you get back by fixing it. The detail view gives the CSS selector, the HTML snippet and every page affected – a sort bar on every category page is one component, and one fix clears it everywhere.

You can mark a finding as "ignore", "can't fix" or "false positive" with a reason; every decision is logged. A clean result here never marks 1.3.1, 3.3.2 or 4.1.2 as passed: whether the labels say the right thing is a person's check, recorded as a manual result.

  • undefined – the same problem on text fields, checkboxes and radio buttons.
  • undefined – custom drop-downs built with role="combobox" or role="listbox" that have no name.
  • undefined – for a country select, autocomplete="country-name" must be a valid value.

Check every drop-down on your site – get a free scan

Frequently asked questions

Isn't the selected option enough of a name?

No. The selected option is the value. A screen reader reads both, and without a name the person hears "Relevance" with no idea it is a sort order.

Can I use the first option as the label?

Not instead of a label. "Choose a country" as the first option disappears once someone chooses, and it is not a name. Keep a real label; a neutral first option is fine in addition.

Does a <fieldset> and <legend> replace the label?

No. The legend names the group, and each select in it still needs its own name. The rule checks each select on its own.

My drop-down is a custom component. Which rule applies?

If it keeps a native <select>, this one. If it is built from ARIA roles such as combobox or listbox, aria-input-field-name checks it.

Sources

  1. W3C, Understanding SC 4.1.2 Name, Role, Value – https://www.w3.org/WAI/WCAG22/Understanding/name-role-value
  2. W3C, Understanding SC 1.3.1 Info and Relationships – https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships
  3. Deque University, axe-core 4.13 rule select-name – https://dequeuniversity.com/rules/axe/4.13/select-name
  4. W3C WAI, Forms Tutorial: Grouping Controls – https://www.w3.org/WAI/tutorials/forms/grouping/
  5. WHATWG, HTML Standard: the label element – https://html.spec.whatwg.org/multipage/forms.html#the-label-element

See what a scan finds on your site

One page in about thirty seconds, no email needed. The full report covers up to 100 pages and a keyboard journey.