WCAG 3.2.1 — On Focus — Context Changes Unexpectedly on Focus
Form fields or links on your website are automatically submitting forms or redirecting users when they simply tab through the page. This prevents keyboard users and people using screen readers from navigating your site predictably. Under ADA Title II, this creates a barrier that must be fixed.
Who Is Affected
Keyboard users who navigate with Tab and Arrow keys, screen reader users, users with motor disabilities who may accidentally trigger focus events, and users with cognitive disabilities who need predictable page behavior.
What This Means
When someone moves focus to an element (by pressing Tab or clicking into it), the page should not automatically submit forms, open new windows, or navigate away. Users need control over when actions happen — they should have to press Enter, Space, or click to trigger meaningful changes.
Common violations include dropdown menus that automatically navigate when focused, search boxes that submit immediately when clicked into, and select lists that redirect the page when an option receives focus (instead of when selected).
Fix: CMS / Theme
Review your site's interactive elements for unexpected behavior:
Navigation Dropdowns:
- Test your main navigation by pressing Tab through each menu item.
- If dropdown submenus appear automatically on focus (not just on hover), this is usually acceptable.
- If the page navigates away when focus moves to a menu item, remove the
onFocusnavigation handler. - In Joomla, check your menu module settings and template overrides.
- In WordPress, review your theme's navigation JavaScript in
functions.phpor theme files.
Form Auto-Submit:
- Check if any forms submit automatically when a field receives focus.
- Remove
onFocus="this.form.submit()"or similar JavaScript handlers. - Replace with explicit submit buttons or
onChangehandlers (which are acceptable under WCAG 3.2.2).
Fix: Content Editor
Search Forms:
- If you have embedded search widgets that auto-submit when focused, replace them with versions that require a click or Enter key.
- For custom HTML forms, remove any
onFocusevent handlers that submit the form. - Ensure all form submissions require an explicit user action like clicking "Submit" or pressing Enter.
Select/Dropdown Lists:
- If you have dropdown lists that navigate to new pages immediately when an option receives focus (not when selected), this needs fixing.
- Change the behavior so navigation only occurs
onChange(when user actually selects an option) rather thanonFocus. - Test by tabbing to the dropdown and using arrow keys — the page should not navigate until you press Enter or click.
Standard Reference
WCAG 2.1 Success Criterion 3.2.1 — On Focus, Level A
When any user interface component receives focus, it does not initiate a change of context.
Check if your government website has this issue
OctoComply scans your website and documents for WCAG 2.1 AA violations. The free tier covers up to 10 pages.
Run a Free Scan