Skip to content
easeweb
Search topics

Custom dropdowns that keyboards and screen readers can't use

A dropdown rebuilt from divs takes only clicks and has a label nothing points to, so keyboards can't choose and screen readers hear no label or options.

WCAG 2.2
SC 2.1.1ASC 4.1.2ASC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken <div class="select" tabindex="0">
The accessibility problem illustrated: No vision:Which size is picked?
01

The problem

Keyboard users can't open the dropdown or pick an option, and screen reader users never hear the "Size" label shown above it, a role, the current value or the options, so they can't tell what they are choosing

02

Try it

Choose a size with the keyboard alone

  • Broken 1: press Tab to reach Size. You can’t: Tab skips Size, which is the failure. Try clicking it instead. The panel shows what a screen reader says as you move and pick.

  • Broken 2: Tab to Size, press Enter to open it, the down arrow, then Enter. Can you choose a size without the mouse? After picking, Tab on and Shift + Tab back: the box is read as just the size, and the label “Size” is never read.

  • Apply a fix. Choose a size with the keyboard again, then Tab on and Shift + Tab back: is the label “Size” read now?

Broken Can you fix this?

Everyday cotton T-shirt

Size
Choose a size

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Use a native select, or a combobox that behaves like one

Before

A dropdown only a click can open

<span id="size-label">Size</span><div class="select">  <div class="select-trigger">Choose a size</div>  <ul class="select-options" hidden>    <li>Small</li>    <li>Medium</li>    <li>Large</li>    <li>Extra large</li>  </ul></div>
What is wrong3 points
  • Nothing in the dropdown can take focus: the trigger and the options are a div and list items with click handlers.
  • Keyboard users can't choose a size: Tab skips the dropdown, and no key opens it.
  • "Size" is never read as the dropdown's name: the span is only placed above the box, not tied to it.
After

A native select with a styled box

<label for="size">Size</label><span class="select-box">  <select id="size" name="size">    <option value="">Choose a size</option>    <option value="s">Small</option>    <option value="m">Medium</option>    <option value="l">Large</option>    <option value="xl">Extra large</option>  </select></span>
How it is fixed5 steps
  1. Replace the dropdown with a select and its options. The browser makes it a Tab stop, opens it with the keys each platform expects, moves through the options with the arrows and by typing a letter, and tells a screen reader its name, its role, its value and each option. On a phone it opens the system picker.
  2. Make "Size" a label whose for matches the select's id, so it is tied to the select in code and read as its name. Clicking the label also focuses the select.
  3. Restyle only the closed box: remove the browser's look with appearance: none, and draw your own border.
  4. Draw the chevron in currentColor on the wrapper, so it follows the text in forced colors.
  5. Draw the focus ring with outline on :focus-visible.

This fixes both Befores and passes 2.1.1, 4.1.2 and 1.3.1. The border, the chevron and the focus ring are yours to draw, and all three survive forced colors. Of the extras a select is often rebuilt for, appearance: base-select lets a native select style its open list and show a swatch or a note in each option too, in Chrome and Edge from version 135 and Safari from 27, in October 2026 (Firefox only behind a flag); other browsers show the ordinary select.

Why this fix: Use native HTML first

Easily confused
04

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared dropdown component changes.

How screen readers handle aria-expanded

Limits

This is a starting pattern for a single-choice dropdown. It doesn't cover grouped options or a list loaded from a server as the person scrolls; choosing several options is covered in multi-selects whose ticks are never read out. Test the complete journey, with your real options, in the browsers and assistive technology you support.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service