WCAG 2.2 - All Success Criteria

Accessibility Checkpoints

Description

Changing the setting of any user interface component must not automatically cause a change of context unless the user has been informed of the behavior beforehand. Examples of a change of context include: form submission, navigation to another page, a significant rearrangement of page content, a new window opening, focus moving to a different component, or any other major alteration that could confuse or disorient the user. This criterion places the responsibility on the page author to avoid unexpected context changes triggered solely by user input.

How To Test

  1. For all form inputs, select boxes, radio buttons, and other form controls, enter or change a value without submitting the form explicitly.
  2. Observe whether changing the value triggers a change of context - such as form submission, page navigation, or significant content reorganization.
  3. Pay special attention to autocomplete and autofill functionality - verify that these features do not overwrite user input unexpectedly.
  4. Check custom widgets that respond to input events (onchange, oninput, onkeyup) for unexpected context changes.
  5. Use a screen reader to confirm that input changes are announced correctly and do not cause unexpected navigation or page reorganization.

Testing Tools

Demo 1: Sort order changes on select change

Demo 1: Sort order applied on select change
  • Microphone — €65
  • Keyboard Stand — €89
  • Audio Interface — €149
  • Monitor Speakers — €220

Change the sort order — the list reorders immediately without any confirmation.

Code
<!-- ❌ onchange immediately reorders — user loses their place -->
<select
  onchange="sortResults(this.value)"
>
  <option>Price (low–high)</option>
  <option>Price (high–low)</option>
</select>
<!-- No Apply button — selection change IS the action -->
<!-- ✓ Select stores the choice; Apply button triggers the sort -->
<select id="sort-select">
  <option>Price (low–high)</option>
  <option>Price (high–low)</option>
</select>
<button onclick="sortResults(select.value)">Apply</button>
Code

Demo 2: OTP field auto-advancing focus

Demo 2: OTP field auto-advancing focus

Enter verification code

Type a digit — focus jumps to the next box automatically, bypassing your control.

Code
<!-- ❌ oninput moves focus to next field — context change on input -->
<input maxlength="1"
  oninput="if (this.value) nextField.focus();"
>
<input maxlength="1"
  oninput="if (this.value) nextField.focus();"
>
<!-- Repeated for each digit — user never controls focus -->
<!-- ✓ Single input — user types freely, no forced focus movement -->
<input type="text" inputmode="numeric"
  maxlength="4" pattern="\d{4}">
Code

Fail Explanation

A common failure occurs when changing a form input value automatically triggers a change of context without explicit user action. Examples include:

These failures prevent users from correcting mistakes, changing their minds, or reviewing their selections before commit. They are particularly problematic for users with motor disabilities, cognitive disabilities, or those using screen readers who may not immediately notice that their input has been modified.

Pass Explanation

A page passes when user input is preserved exactly as entered, and any changes require explicit activation (clicking a button, pressing Enter). If the page offers helpful features like autocomplete or auto-formatting, these must not override the user's actual input - they should appear as suggestions in a separate area (dropdown, list, dialog) that the user can accept or dismiss. Users retain full control: they can review their input, correct mistakes, and choose when to commit their changes.

Notes

This criterion applies specifically to unintended changes of context. Some input changes that provide immediate visual feedback (like filtering a list as you type, or showing matching results in real-time) are not considered changes of context if the user remains focused on the same page and can continue interacting predictably. The distinction is whether the change is major and disorienting versus providing immediate, in-context feedback.

WCAG Techniques

Techniques

WCAG techniques used in this demo: G80, H32, H84

Suggested Solutions & References