Agent Wranglers

Accessibility Required

Change nothing on focus or input alone

Never open a new page, submit a form or move focus just because a field got focus or its value changed. These are WCAG criteria 3.2.1 and 3.2.2 (A).

How to do it

Let people press a button to submit or go. A select that navigates on change needs a "Go" button instead. If a change must act at once, say so in text before the control.

Example

<!-- Bad: leaves the page as soon as the choice changes -->
<select onchange="location = this.value">…</select>
<!-- Good: nothing happens until the button -->
<form action="/region"><select name="r">…</select><button>Go</button></form>

How to check

A browser test focuses and changes every field. The URL and the number of open windows stay the same.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/accessibility/no-surprise-changes.