Sub topic 11
Confirmations and destructive actions
This chapter assumes you already know how to write button labels (naming the action), error messages (saying what happened and what to do), and how to adjust tone for high-risk moments. Here you apply those skills to the moments when a user is about to do something that is hard to undo.
What a confirmation is for
A confirmation is a short interruption placed before an action. Its job is to let the user check that they are about to do what they mean to do. It is not there to protect the product from blame.
Confirmations have a cost. Each one adds a step, and users who see them too often click through without reading. This is called confirmation fatigue. When every action asks "Are you sure?", the one dialog that matters gets the same automatic click as the rest.
So the first decision is whether to ask at all. Use this order of preference:
- Make the action reversible. Offer undo, a trash folder, or a grace period. This is usually the best option.
- Confirm only when the action is hard to reverse or affects other people. Examples are permanent deletion, removing a team member, or sending a message to a thousand customers.
- Do nothing special for low-risk, easily repeated actions such as archiving a draft or changing a filter.
The anatomy of a good confirmation dialog
A confirmation dialog has three pieces of copy: a title, a body, and buttons. Each has a specific job.
| Part | Job | Weak example | Strong example |
|---|---|---|---|
| Title | Name the action and the object | Are you sure? | Delete 'Q3 report'? |
| Body | State the consequence and any way back | This action cannot be undone. | This removes the file for everyone on the team. You can restore it from Trash for 30 days. |
| Confirm button | Repeat the action | Yes | Delete file |
| Cancel button | Offer a safe exit | No | Cancel |
Here is the full strong version:
Title: Delete 'Q3 report'?
Body: This removes the file for everyone on the team. You can restore it from Trash for 30 days.
Buttons: Cancel | Delete fileThe title names the object
"Are you sure?" forces the user to remember what they clicked. If they clicked quickly, or the dialog appeared after a delay, they may not know what "this" refers to. Putting the object's name in the title lets them catch a mistake, such as selecting the wrong row.
Truncate long names in the middle or at the end, but keep enough characters to tell similar items apart. "Delete 'Q3 report (final…'?" is more useful than "Delete this file?".
The body states the consequence
Say what will happen, who it affects, and whether there is a way back. These three facts answer the questions a careful user would ask before clicking.
- What happens: "This removes the file."
- Who it affects: "for everyone on the team."
- The way back, if any: "You can restore it from Trash for 30 days."
If there is no way back, say so plainly: "This permanently deletes the file. It can't be restored." Avoid vague warnings such as "This action cannot be undone", which do not say what the action is.
Keep the body to one or two sentences. Users do not read long dialogs. Put the most serious fact first.
The confirm button repeats the action
The button label should match the verb in the title. A user who skims only the buttons should still know what will happen. "Delete file" tells them. "Yes" and "OK" do not, and they can be misread when the question is phrased as a negative ("Don't you want to keep changes?").
The cancel button is a real exit
Label it "Cancel" or, when the dialog interrupts a flow, something more specific such as "Keep editing" or "Keep file". Avoid labels that blur the choice, such as "Go back" next to "Discard", where users may not know which one saves their work.
Matching friction to risk
Not every destructive action needs the same weight. Scale the confirmation to the damage.
| Risk level | Example | Pattern |
|---|---|---|
| Low, reversible | Delete one email | No dialog. Show "Email deleted. Undo" for several seconds. |
| Medium | Delete a project with files in Trash | Standard dialog with consequence and recovery window. |
| High, irreversible | Delete an account and all data | Dialog that requires extra effort, such as typing the account name. |
For high-risk actions, a typed confirmation slows the user down on purpose. Ask them to type something specific, and make the instruction exact:
Title: Delete the 'Acme Marketing' workspace?
Body: This permanently deletes 48 projects and removes access for 12 members. It can't be restored.
To confirm, type the workspace name: Acme Marketing
Buttons: Cancel | Delete workspaceKeep the confirm button disabled until the typed text matches. Tell users what is required instead of leaving them guessing why the button does not respond. Accept the match regardless of letter case unless case really matters, and ignore trailing spaces.
Style the action to match its weight
Copy and visual design work together. A destructive confirm button is often given a warning color, but color alone does not carry the meaning. Users who cannot distinguish colors, or who use a screen reader, rely on the words. That is another reason for "Delete file" instead of "Confirm".
Two further rules:
- Do not make the destructive option the default focus when the action is high risk. A user who presses Enter reflexively should land on "Cancel".
- Keep button order consistent across the product. If "Cancel" sits on the left in one dialog and on the right in another, users will misclick.
Confirmation after the action
A confirmation can also come after an action, as a message that says it worked. Treat this as a separate piece of copy with its own rules.
- State the result and name the object: "Project 'Atlas' deleted."
- Offer the way back right there: "Undo".
- Keep the tone calm. A deletion is not a celebration, so skip exclamation marks.
- Make the message visible long enough to read and act on. For undo, a few seconds is the minimum, and the message should be announced to screen reader users, for example with a live region.
<div role="status" aria-live="polite">
Project 'Atlas' deleted. <button type="button">Undo</button>
</div>The role="status" attribute makes screen readers announce the message without moving the user's focus.
Common errors
- Asking about everything. Every unnecessary dialog trains users to dismiss the necessary ones.
- Generic buttons. "Yes/No" and "OK/Cancel" force users to re-read the question.
- Hiding the consequence. "Are you sure you want to continue?" says nothing about what continuing does.
- Scare language for mild actions. Words such as "Warning!" or "Danger!" on a reversible action make real warnings less credible.
- Blaming the user. "You are about to lose your data" is accurate but can read as accusing. "Your unsaved changes will be lost" describes the same fact neutrally.
- Mixing verbs. A title that says "Remove" with a button that says "Delete" makes the user wonder whether those are two different actions. Use your terminology list.
Choosing a pattern
The diagram shows how to decide which pattern to use.
Worked rewrite
Here is a weak dialog from a file-sharing product:
Title: Warning
Body: Are you sure you want to proceed? This action cannot be undone.
Buttons: No | YesProblems: the title names nothing, the body does not say what the action is, and "Yes" and "No" give no clue. Rewrite it, assuming the action removes a person's access to a shared folder:
Title: Remove Dana Lee from 'Design assets'?
Body: Dana will lose access to this folder right away. Files she created stay in the folder. You can invite her again later.
Buttons: Cancel | Remove DanaThe title names the person and the folder. The body gives the consequence, what is kept, and the way back. The button repeats the action.
Exercise
A project management app shows this dialog when a user archives a finished project. Title: "Confirm". Body: "Are you sure you want to do this?" Buttons: "No" and "Yes". Archived projects can be restored from the Archive tab at any time. Decide whether a dialog is needed, and if you keep it, rewrite it.
Show answer
Because archiving is easily reversible, the best fix is to remove the dialog and show a message after the action: "Project 'Atlas' archived. Undo". If you keep a dialog, rewrite it: Title "Archive 'Atlas'?", Body "The project moves to the Archive tab. You can restore it at any time.", Buttons "Cancel" and "Archive project". The title names the object, the body gives the consequence and the way back, and the button repeats the action.
Exercise
Write a confirmation for permanently deleting a user's account in a photo-storage app. Deletion removes 2,400 photos immediately and cannot be reversed. Decide what extra safeguard to use and write the title, body, and button labels.
Show answer
Use a typed confirmation because the action is irreversible and removes a lot of data. Example: Title "Delete your account?", Body "This permanently deletes your account and all 2,400 photos. It can't be restored. To confirm, type your email address.", Buttons "Cancel" and "Delete account". Keep "Delete account" disabled until the typed email matches. The consequence is stated with a number, the lack of recovery is stated plainly, and the button repeats the action.