Confirming vs undoing a destructive action
People delete things by mistake, and asking “are you sure?” every time teaches them to click yes without reading.
The answer
Act at once and offer undo. Ask “are you sure?” only when it truly cannot be undone and is rare. As strong as the weakest rule behind it: moderate.
-
If the action can be undone, do it at once and offer Undo. Don’t ask first.
Apple, Primer, Automattic and three essays agree, and WCAG accepts reversibility as a safeguard. Nielsen's NN/g article treats undo as a complement to confirmation, not a replacement, so it is not counted here. No study compares the two approaches, so convention caps it at 3.
- Applies when
- The action can be undone.
- Based on
- Convention
- Depends on
- Whether it can be undone
- Principle
- Help people recover from errors
- StandardStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
- GuidanceGuidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Delete scenario pattern (Primer)GitHub
- Guidance: Destructive actions (Automattic Design System)Automattic
- Guidance: NN/g article on user mistakes (exact headline not captured)Page Laubheimer, 2015
- Guidance: Never Use a Warning When You Mean UndoAza Raskin, 2007
- Guidance: How To Manage Dangerous Actions In User InterfacesVictor Ponamariov, 2024
-
Ask for confirmation before an action that can’t be undone and is rare or serious.
Near-universal across eight or more design systems and NN/g. No research. Rated 3. Apple's page was reopened and checked.
- Applies when
- The action cannot be undone, and it is rare or serious.
- Based on
- Convention
- Depends on
- Whether it can be undone, How often they do it, What a mistake costs
- Principle
- Prevent errors
- GuidanceGuidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: carbon-2025-modal-danger
- Guidance: Confirm a destructive action (Government of Alberta design system)Government of Alberta
- Guidance: Confirm an action (pattern, Experimental)Ministry of Justice, 2026
- Guidance: Destructive actions (Automattic Design System)Automattic
- Guidance: Modal design guidelines (PatternFly)Red Hat
- Guidance: Modal web component (Shopify App Home)Shopify
- Guidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
The other rules
In every case
-
When an action deletes or changes saved data, or commits people legally or financially, give at least one safeguard: undo, a chance to correct, or a review before it’s final.
Required by WCAG 2.2 at level AA. Both reopened and checked.
- Applies when
- The action commits the person legally or financially, or deletes or changes their stored data.
- Based on
- Standard or law
- Depends on
- What a mistake costs
- Principle
- Prevent errors
- StandardStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
-
If a message like “Deleted” appears without moving focus, make sure screen readers announce it.
Required by WCAG 2.2 at level AA. Both reopened and checked.
- Applies when
- A result message is shown without a focus change.
- Based on
- Standard or law
- Principle
- Work for everyone
- StandardStandard: Understanding SC 4.1.3 Status Messages (Level AA)W3C WAI
When the action can be undone, or could be made to
-
Where you can, keep deleted things recoverable for a while, so deletion can be undone later too.
NN/g and three essays, and WCAG lists recovery of deleted information as a technique. Rated 3.
- Applies when
- The product can hold deleted data.
- Based on
- Convention
- Principle
- Help people recover from errors
- StandardStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
- GuidanceGuidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
- Guidance: Never Use a Warning When You Mean UndoAza Raskin, 2007
- Guidance: Are You Sure? Versus Undo: Design and TechnologySteven Hoober, 2020
- Guidance: How To Manage Dangerous Actions In User InterfacesVictor Ponamariov, 2024
-
Don’t offer Undo only in a message that disappears. Keep it somewhere that stays.
One expert essay plus my reading of WCAG 2.2.1, which does not mention undo. Inference, so capped at 2.
- Applies when
- Undo is offered in a message that times out.
- Based on
- Reasoned, not tested
- Principle
- Help people recover from errors
- Common mistake
- Undo offered only in a message that vanishes after a few seconds (rule 12).
- StandardStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- GuidanceGuidance: A toast to a11y toastsScott O'Hara, 2025
-
How long Undo should stay available is unsettled.
No evidence either way. Rated 1.
- Applies when
- Undo is offered for a limited time.
- Based on
- Convention
- Principle
- Help people recover from errors
- StandardStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
- GuidanceGuidance: Send or unsend Gmail messagesGoogle
- Guidance: Are You Sure? Versus Undo: Design and TechnologySteven Hoober, 2020
When it can’t be undone
If people do it often
-
Don’t ask for confirmation.
Design systems and NN/g agree. The research behind "people stop reading" is strong but measured security warnings, consent dialogs and clinical alerts, not confirmations of a person's own action, and one review found many overridden clinical alerts were overridden correctly. A narrower measure than the rule claims, so 3, not 4.
- Applies when
- The action is routine.
- Based on
- Convention
- Depends on
- How often they do it
- Principle
- Let practiced people go faster
- Common mistake
- Confirming everything. Field data on browser security warnings shows the most frequent warnings were clicked through fastest and most often (Devdatta Akhawe, 2013). That is a neighboring kind of dialog, not delete confirmation.
- ExperimentsExperiment: You've been warned: An empirical study of the effectiveness of web browser phishing warningsSerge Egelman, 2008
- Experiment: From Warning to Wallpaper: Why the Brain Habituates to Security Warnings and What Can Be Done About ItBonnie Anderson, 2016
- Experiment: Improving Security Decisions with Polymorphic and Audited DialogsJosé Carlos Brustoloni, 2007
- Field dataField data: Alice in Warningland: A Large-Scale Field Study of Browser Security Warning EffectivenessDevdatta Akhawe, 2013
- StandardStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
- GuidanceGuidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: Delete scenario pattern (Primer)GitHub
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
- Guidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
If it’s rare
-
In the confirmation, name what’s affected, say what will happen, and say it can’t be undone.
Near-universal across eight or more design systems and NN/g. No research. Rated 3. Apple's page was reopened and checked.
- Applies when
- A confirmation is shown.
- Based on
- Convention
- Principle
- Speak the person’s language
- GuidanceGuidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
- Guidance: NN/g article on user mistakes (exact headline not captured)Page Laubheimer, 2015
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: carbon-2025-modal-danger
- Guidance: Confirm a destructive action (Government of Alberta design system)Government of Alberta
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
- Guidance: Confirm an action (pattern, Experimental)Ministry of Justice, 2026
- Guidance: Modal web component (Shopify App Home)Shopify
-
Label the confirm button with the action, such as “Delete file”, and the other “Cancel”. Not Yes, No or OK.
Near-universal across eight or more design systems and NN/g. No research. Rated 3. Apple's page was reopened and checked.
- Applies when
- A confirmation is shown.
- Based on
- Convention
- Principle
- Speak the person’s language
- Common mistake
- "Are you sure?" with "Yes" and "No". Does not say what will happen (Jakob Nielsen, 2018; Apple Inc., 2026).
- GuidanceGuidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
- Guidance: NN/g article on user mistakes (exact headline not captured)Page Laubheimer, 2015
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: carbon-2025-modal-danger
- Guidance: Modal design guidelines (PatternFly)Red Hat
- Guidance: Modal web component (Shopify App Home)Shopify
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
-
Let people back out with Cancel or Escape, and return focus to the button that opened the confirmation.
The ARIA practices guide, Primer and Apple agree; one small system blocks Escape. Rated 3.
- Applies when
- A confirmation is shown.
- Based on
- Convention
- Principle
- Keep people in control
- GuidanceGuidance: apg-2026-dialog-modal
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
-
If it affects a lot, such as a whole account or project, make people type its name to confirm.
Primer, PatternFly and NN/g agree. One large online experiment found that making people retype a name roughly halved uninformed acceptance of a risky install, at a time cost, which supports the mechanism in a different setting. Rated 3.
- Applies when
- The action cannot be undone, is rare and affects a lot.
- Based on
- Convention
- Depends on
- Whether it can be undone, How often they do it, What a mistake costs
- Principle
- Prevent errors
- ExperimentExperiment: Your Attention Please: Designing security-decision UIs to make genuine risks harder to ignoreCristian Bravo-Lillo, 2013
- GuidanceGuidance: Delete scenario pattern (Primer)GitHub
- Guidance: Modal design guidelines (PatternFly)Red Hat
- Guidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
- Guidance: How To Manage Dangerous Actions In User InterfacesVictor Ponamariov, 2024
- Guidance: Never Use a Warning When You Mean UndoAza Raskin, 2007
-
When a confirmation opens, don’t focus the destructive button. Whether to focus Cancel or nothing is unsettled.
Convention with open dissent. Rated 2.
- Applies when
- A confirmation is shown.
- Based on
- Convention
- Principle
- Prevent errors
- GuidanceGuidance: apg-2026-dialog-modal
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
- Guidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: carbon-2025-modal-danger
Accessibility
- WCAG 2.2 · 3.3.4 · AAOne of reversible, checked, or confirmed. Recovery and confirmation are both listed as sufficient for deletion. The criterion says it is not meant to require confirmation of every save.
- WCAG 2.2 · 4.1.3 · AAResult messages that do not take focus must be exposed for announcement.
- WCAG 2.2 · 2.2.1 · ATime limits must be adjustable or extendable. The Understanding document does not mention undo, so applying it to an undo offer is inference.rule 12
- ARIA guideWAI-ARIA Authoring Practices, modal dialog and alert dialog patterns: focus stays in the dialog, Escape closes it, focus returns to the opener. It suggests, without requiring, initial focus on the least destructive control for irreversible steps.
- WCAG 2.2 · 3.3.6Also likely to apply: 3.3.6 Error Prevention (All) (AAA).
Open questions
- OpenNo study was found that compares confirmation with undo for destructive actions. Every source that prefers undo argues from reasoning or from habituation research on other kinds of dialog.
- OpenRoutine actions that cannot be undone, such as sending a message. Confirmation trains click-through; the sources offer a short delay before the action takes effect, but no evidence for how long.
- OpenUndo duration. Google's help page gives 5 to 30 seconds, set by the user, for undoing a sent email, without reasons. No source gives evidence for any length.
- OpenInitial focus. Primer puts it on Cancel; Apple says Cancel should not be the default and suggests no default so that people read; Carbon's general rule would put it on the primary control.
- OpenShould Escape always cancel? One small system blocks it to force a choice.
Dark patterns
- Accidental and unauthorized chargesLets a charge happen without a deliberate act by the account holder: purchase buttons placed where people tap for other reasons, purchases by children without consent, charges after cancellation.Evidence of harm: weak.
- ConfirmshamingWords the option to decline so that choosing it feels foolish or shameful, such as 'No thanks, I prefer paying full price'.Evidence of harm: moderate.
Sources
- ExperimentsExperiment: You've been warned: An empirical study of the effectiveness of web browser phishing warningsSerge Egelman, 2008
- Experiment: From Warning to Wallpaper: Why the Brain Habituates to Security Warnings and What Can Be Done About ItBonnie Anderson, 2016
- Experiment: Improving Security Decisions with Polymorphic and Audited DialogsJosé Carlos Brustoloni, 2007
- Experiment: Your Attention Please: Designing security-decision UIs to make genuine risks harder to ignoreCristian Bravo-Lillo, 2013
- Field dataField data: Alice in Warningland: A Large-Scale Field Study of Browser Security Warning EffectivenessDevdatta Akhawe, 2013
- StandardsStandard: Understanding SC 3.3.4 Error Prevention (Legal, Financial, Data) (Level AA)W3C WAI
- Standard: Understanding SC 4.1.3 Status Messages (Level AA)W3C WAI
- Standard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- GuidanceGuidance: Human Interface Guidelines - AlertsApple Inc., 2026
- Guidance: Delete scenario pattern (Primer)GitHub
- Guidance: Destructive actions (Automattic Design System)Automattic
- Guidance: NN/g article on user mistakes (exact headline not captured)Page Laubheimer, 2015
- Guidance: Never Use a Warning When You Mean UndoAza Raskin, 2007
- Guidance: How To Manage Dangerous Actions In User InterfacesVictor Ponamariov, 2024
- Guidance: Confirmation dialog - guidelines and accessibility (Primer)GitHub
- Guidance: Alert dialog (HealthMetrics design system)HealthMetrics design system
- Guidance: Confirmation Dialogs Can Prevent User Errors - If Not OverusedJakob Nielsen, 2018
- Guidance: carbon-2025-modal-danger
- Guidance: Confirm a destructive action (Government of Alberta design system)Government of Alberta
- Guidance: Confirm an action (pattern, Experimental)Ministry of Justice, 2026
- Guidance: Modal design guidelines (PatternFly)Red Hat
- Guidance: Modal web component (Shopify App Home)Shopify
- Guidance: apg-2026-dialog-modal
- Guidance: Are You Sure? Versus Undo: Design and TechnologySteven Hoober, 2020
- Guidance: A toast to a11y toastsScott O'Hara, 2025
- Guidance: Send or unsend Gmail messagesGoogle
Related
- Confirmation dialogsConfirm rarely, label the buttons with what they do, and for severe actions make people engage with the detail.Answer: moderate.
- Modal dialogsUse a modal only when people must respond before anything else, and only after their own action.Answer: moderate.
- Focus management on open and closeMove focus into a dialog when it opens, and back to the control that opened it when it closes.Answer: moderate.
- Toasts and notificationsUse messages that vanish by themselves only for things people can afford to miss.Answer: moderate.
- Time limitsAvoid time limits. Where one is needed, warn before it ends and let people extend it.Answer: moderate.