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.

Deleting a file. Asking “Are you sure?” first adds a dialog to every delete. Deleting at once and offering Undo keeps the action fast and still recoverable.

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.

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.
  • If a message like “Deleted” appears without moving focus, make sure screen readers announce it.

When the action can be undone, or could be made to

When it can’t be undone

If people do it often

If it’s rare

Accessibility

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

Checked November 11, 2026

Sources