Skip to content
easeweb
Search topics

Dropdowns and fields that change the page on their own

A sort menu reloads the page as soon as its value changes, and a date field pulls focus into its calendar the moment it is focused.

WCAG 2.2
SC 3.2.1ASC 3.2.2A
Required by
Section 508 · EN 301 549 (EU)
Broken <select onchange="this.form.submit()">
The accessibility problem illustrated: One arrow press, and the page reloads.
01

The problem

Keyboard and screen reader users are sent away, or pulled ahead, before they have chosen anything.

02

Try it

Change a field with the keyboard, and watch where focus goes.

In Broken 1, press ↓ in Sort by and watch where focus goes. In Broken 2, Tab to Delivery date, then press Shift+Tab to go back to Name.

Broken Can you fix this?

Pens

  • Fineliner
  • Gel pen
  • Brush pen
  • Fountain pen

Press Tab until Sort by is focused, then press ↓.

Focus is on: not in the page yet

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Wait for a button, or make the change in place and leave focus where it is.

  1. 1Focusing a control never moves focus, opens a window or leaves the page.
  2. 2A new value changes the page only after a button press, or in place with focus left on the control.
  3. 3Whatever changes appears next to the control that changed it.
Before

A sort menu that reloads on change

<form action="/pens" method="get">  <label for="sort">Sort by</label>  <select id="sort" name="sort" onchange="this.form.submit()">    <option value="popular">Most popular</option>    <option value="name">Name, A to Z</option>    <option value="new">Newest</option>  </select></form>
After

A button that applies the choice

<form action="/pens" method="get">  <label for="sort">Sort by</label>  <select id="sort" name="sort">    <option value="popular">Most popular</option>    <option value="name">Name, A to Z</option>    <option value="new">Newest</option>  </select>  <button type="submit">Sort</button></form> <label for="date">Delivery date</label><p id="date-format">For example, 2026-12-14</p><input id="date" name="date" aria-describedby="date-format"><button type="button" id="date-button"  aria-expanded="false" aria-controls="calendar">Choose date</button>

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom

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 form or filter components change.

Limits

This is a starting pattern, not a guarantee for every application. Browsers differ in when they fire change from the keyboard: on macOS the arrow keys open the list, and the value changes when it is confirmed. Test with the platforms your users have, and with the components your site really uses.

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.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work