Skip to content

Drop-down list without a label

a11y-select-namecritical
On this page

Why it matters

  • Stores use drop-down lists for size, colour, quantity, city and the order of products. A screen reader reads a list's label when it gets focus; without one, people hear the chosen option alone, such as «50 مل», and cannot tell what they are choosing.
  • Text placed near a list without being tied to it, such as a paragraph above it, is not read with it.
  • WCAG 2.2 asks that every control has a name that assistive technology can read (success criterion 4.1.2, level A).

Example

Wrong
<p>الحجم</p>
<select id="size" name="size"><option>50 مل</option><option>100 مل</option></select>
Right
<label for="size">الحجم</label>
<select id="size" name="size"><option>50 مل</option><option>100 مل</option></select>

How to fix

  • Tie a <label> to the list: <label for="size">الحجم</label> <select id="size">…</select>, or put the list inside its label.
  • For a list without visible text, such as a sort menu above the products, give it aria-label="ترتيب المنتجات".

How we detect

  1. We render the page and run axe-core 4.13.0's select-name rule in each engine.
  2. It reports each <select> without an accessible name: no label, aria-label, aria-labelledby or title. Unlike a text field, a list has no placeholder to stand in for one.
  3. It does not apply to pages without drop-down lists.