Skip to main content
WCAGrules
Quick navigation

Ask for confirmation before completing risky actions

G168 asks for a confirmation step on actions that cannot be undone once they run. W3C is clear about what that confirmation has to contain. It names the action chosen. It states the consequence of continuing, so the user can recognize a mistake rather than answering yes out of habit to a vague question. W3C's own example is a user who hits the wrong button because Submit and Cancel were in an unexpected order. This is a sufficient technique for 3.3.4 Error Prevention at Level AA. It is one of five parallel techniques on that rule and W3C prefers none of them. A confirmation dialog is not automatically better than being able to recover the data afterwards. Recovery is often kinder, because it costs nobody an extra click.

How we find it in an audit

Our reviewers find the destructive and irreversible actions first, then trigger each one. We check that something intervenes, that the wording names the consequence rather than asking are you sure, and that the dialog is properly built. Focus has to move into it, Escape has to close it, and a screen reader has to announce it, or the confirmation is a barrier for exactly the people it was meant to protect.

How affected users experience it

A confirmation dialog that appears without moving focus is worse than none at all. The screen reader user hears nothing change, presses Enter again on the button they think is still there, and confirms the deletion without ever knowing they were asked. Built properly, the same dialog is the moment somebody navigating by keyboard catches a slip before it costs them their account.

Passes vs. fails

Passes: review before it is final. Fails: one accidental tap = charged.

Passes

A confirmation follows, reading 'This permanently deletes your account and its data. Continue?', with explicit Confirm and Cancel buttons.

Fails

Clicking 'Delete account' in a settings list removes the account immediately, with no step in between.

Other ways to satisfy this rule

7 guides on this site are filed under 3.3.4 Error Prevention (Legal, Financial, Data). W3C lists this one as sufficient for that rule on its own. Implement it correctly, in a way your readers' software actually supports, and the rule is met.

This guide is our interpretation of W3C technique G168: Requesting confirmation to continue with selected action. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations