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
<p>الحجم</p> <select id="size" name="size"><option>50 مل</option><option>100 مل</option></select>
<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
- We render the page and run axe-core 4.13.0's
select-namerule in each engine. - It reports each
<select>without an accessible name: no label,aria-label,aria-labelledbyortitle. Unlike a text field, a list has no placeholder to stand in for one. - It does not apply to pages without drop-down lists.