Forms
Dropdown changes page when an option is chosen
WCAG 2.2 success criterion 3.2.2 On Input (Level A)
- WCAG 2.2
- 3.2.2 On Input
- Level
- A
- Default severity
- Needs review
- Available in
- Free
Updated for Lumtera 1.2.2 and Lumtera Pro 1.1.1.
Why does it matter?
Keyboard users look through a dropdown with the arrow keys. If choosing an option loads another page at once, the first press of the down arrow sends them away before they reach the option they wanted, and screen reader users are surprised by a new page.
Who it affects: Screen reader users, voice-control users who say a field's label to move to it, and people with memory or attention difficulties who lose a placeholder once they type.
What does Lumtera flag?
Dropdowns whose onchange attribute goes to another address or submits the form, and dropdowns that an inline script on the page names by id, listens to for "change" and navigates with, as WordPress's classic Categories and Archives dropdowns do. A submit button in the same form (a "Go" button) counts as a way to confirm, so those pass; hidden and disabled dropdowns are skipped. Each is for review, since some browsers only fire "change" on Enter.
Check ID select-navigates — use it to filter the content report or with wp lumtera issues --rule.
How do I fix it in WordPress?
Add a "Go" button next to the dropdown and remove the automatic jump, so the page only changes when the visitor presses the button. For WordPress's Categories or Archives dropdown, you can switch the widget or block to show a list of links instead of a dropdown. Check the result with the keyboard: Tab to the dropdown, use the arrow keys to move through the options, and make sure you stay on the page.
Example
<select onchange="location.href = this.value">…</select>
<form action="/">
<select name="cat">…</select>
<button type="submit">Go</button>
</form>
How do I check the fix?
- Update the post. The issue disappears from the Lumtera Accessibility sidebar on the next check, and from the site report on the next scan.
- Click each field's label: the cursor should move into the field. With a screen reader, each field should announce its label when it receives focus.
Find this issue across your whole site
Lumtera runs this check in the block editor sidebar as you write, in the Elementor panel, in Review mode on the live page, and across the whole site in the content report and with wp lumtera scan. You can change its severity or turn it off in Lumtera → Settings.
Related checks
-
WCAG 4.1.2 · AError
Form field has no label
-
WCAG 1.3.1 · ANeeds review
Form field has more than one label
-
WCAG 1.3.1 · ANeeds review
Options are not grouped with their question
-
WCAG 1.3.5 · AATip
Personal-data field has no autocomplete
-
WCAG 3.3.7 · ATip
Form asks for the same email twice
-
WCAG 3.3.8 · AAError
Password field blocks pasting or password managers
Start with the free plugin today
All 69 content checks and 33 whole-page checks, fixes you approve with undo, and the site report — free, with no account and no page limits.