# Confirmation dialogs

Source: https://watership.ca/ux-writing/confirmation-dialogs/

*Drafted introduction, awaiting review.*

A confirmation dialog stops a person before an action that can’t be undone and asks them to confirm it. It interrupts on purpose, so it works only when it’s rare: a person who sees one for every small action learns to press the primary button without reading it. This section decides when to ask, and what the title, the body, and the buttons say when you do. Titles of other dialogs are in [Titles](https://watership.ca/ux-writing/titles/).

### Confirmation title and body

Rule `ux-confirm-consequence`: avoid, judgment. Address: https://watership.ca/ux-writing/confirmation-dialogs/#ux-confirm-consequence

**Make the title the question or the consequence, and the body what can’t be undone.** The primary button repeats the action from the title, and **Cancel** changes nothing.

- Instead of: Are you sure? / This action might have consequences. / `OK` `Cancel`
- Write: Delete 3 files? / This can’t be undone. / `Delete 3 files` `Cancel`

### Undo instead of confirmation

Rule `ux-undo-not-confirm`: avoid, judgment. Address: https://watership.ca/ux-writing/confirmation-dialogs/#ux-undo-not-confirm

**Don’t confirm an action that’s easy to undo; offer undo instead.** A confirmation is for the things that can’t come back: deletion without a trash, a sent message, a charge. Archiving, moving, and renaming get a toast with **Undo**. In the example pair, the first half is a dialog shown before archiving and the second is the toast shown after it.

- Instead of: Archive this conversation? `Archive` `Cancel`
- Write: `Conversation archived`, with an **Undo** button
