• Success Criterion 3.2.2
  • Conformance level A

Control Inside a Dialog That Accidentally Closes the Whole Dialog

3.2.2 — On Input

Scenario

Setting

A grocery delivery app's shopping cart

What’s wrong

Interacting with a control inside an overlay unexpectedly closes the overlay — the user presses an in-dialog button and the whole dialog vanishes mid-task.

Example

<select onchange="location.href=this.value">

Why it matters

Keyboard and screen-reader users, and people who need predictable form behavior.

How to test

Press a button inside an open overlay/dialog: if it unexpectedly closes the entire overlay instead of just performing its own action, it fails.

How to fix

Changing a field's value must not navigate, submit, close, or change context unless the user was told beforehand or explicitly confirms.

<select onchange="updatePreview()"></select>
<button onclick="navigate()">Go</button>

Changing a value should update state, not silently navigate — let the user confirm with an explicit action.

Outcome

On a grocery delivery app's shopping cart, this barrier is gone for keyboard and screen-reader users — they can complete the task without hitting this wall.

Who is affected

Keyboard and screen-reader users, and people who need predictable form behavior.

Learn more