Confirm or undo? Handling delete and cancel actions in apps
Short answer: In business apps, actions like deleting a customer, cancelling an order, refunding a payment or removing hundreds of records need protection from accidental taps, but a confirmation box on everything trains people to click "OK" without reading. Make common actions undoable instead of confirmed, reserve confirmation dialogs for uncommon actions that can't be undone, write buttons that name the action ("Delete 48 invoices", not "OK"), and add extra friction only for the most serious cases. Apple's design guidelines and the W3C's accessibility guidance both point in this direction.
Why "Are you sure?" often fails
When every deletion triggers the same dialog, people stop reading it. The dialog becomes an extra click on the way to the action, and it doesn't prevent the mistakes it was meant to stop. Meanwhile, genuinely dangerous actions look no different from trivial ones.
Apple's Human Interface Guidelines on alerts advise using alerts sparingly, because they interrupt the current task. They specifically say to avoid alerts for common, undoable actions, even destructive ones: people delete an email or file intending to discard it, and can undo it. In contrast, when people take an uncommon destructive action they can't undo, it's important to show an alert in case they started it by accident.
Prefer undo for everyday actions
For frequent actions, such as archiving a message, removing an item from a list or deleting a draft:
- Do the action immediately and show a short message with an Undo button.
- Keep deleted items in a trash or archive for a period, with a way to restore them.
- Soft-delete records in the database so they can be recovered by support if needed.
The W3C's Understanding document for WCAG success criterion 3.3.4, which covers pages that cause legal commitments or financial transactions, modify or delete user data, or submit test responses, requires at least one of: submissions are reversible, input is checked with an opportunity to correct, or there's a mechanism to review, confirm and correct before finalising. For deletion, the listed techniques include providing the ability to recover deleted information and requesting confirmation to continue. Reversibility counts as a full answer.
Confirm the rare and irreversible
Use a confirmation dialog when an action is uncommon and can't be undone, such as:
- permanently deleting a customer and their history;
- issuing a refund;
- cancelling a subscription or a paid order;
- deleting a whole project, account or store;
- sending a message to all customers.
Write dialogs people actually read
- Say what will happen, specifically: "Permanently delete Acme Ltd and its 312 invoices? This can't be undone."
- Name the action on the button. Apple's guidelines recommend short, specific button titles that describe the result, such as "Erase", "Clear" or "Delete", and avoiding "OK" unless the alert is purely informational. They also say always to use "Cancel" for the button that cancels.
- Show the scope for bulk actions: how many items, and which.
- Make the safe choice easy to reach, and don't pre-focus the destructive button for actions people didn't deliberately choose. Apple's guidance reserves its destructive button style for destructive actions people didn't deliberately choose; when someone explicitly chose a destructive action, such as Empty Trash, the confirming button performs their original intent.
Add friction for the most serious actions
For a handful of actions with big consequences, such as deleting a company account or wiping production data:
- ask the person to type the name of the thing being deleted;
- require a recent re-login or second factor;
- require approval from a second person;
- delay the action, with a cancellation window and an email notice.
Use these sparingly, or they become as ignored as everything else.
Bulk actions need extra care
Selecting "all" on a filtered list and pressing delete is a common way to lose data. In bulk actions:
- show the number of selected items clearly, including items on other pages;
- state exactly what will happen to each;
- process in the background with a summary and, where possible, an undo period.
Log destructive actions
Record who did what, when, and to which records. An audit trail helps support restore data, explains mysteries and discourages carelessness.
Permissions reduce the risk too
Not everyone needs every destructive action. Give refunds, permanent deletion and bulk changes to the roles that genuinely need them, and leave everyday staff with archive and edit rights. Fewer people with dangerous buttons means fewer accidents, and clear roles make it easier to see who should be asked when a serious action is needed. Review roles when staff change jobs or leave.
Test with real users
Watch a few staff members use the app for typical tasks. Note where they hesitate, where they click through dialogs without reading, and where they look for an undo that isn't there. Those moments show which confirmations to remove, which to strengthen and where undo would help most.
An illustrative example
A hypothetical Vancouver property management company's internal app asked "Are you sure?" with OK and Cancel for every action, including archiving a maintenance note. Staff clicked OK automatically, and one morning a manager permanently deleted a building's tenant records by mistake. The developer changed archiving and note deletion to instant actions with Undo, moved deleted records to a 30-day trash, rewrote the remaining dialogs to name the action and count affected records, and required typing the building name to delete a building permanently.
FAQ
Should every delete have Undo?
Where practical, yes. Undo protects without interrupting.
Is a confirmation dialog an accessibility requirement?
WCAG 3.3.4 accepts reversibility, checking or confirmation for the situations it covers.
What about mobile apps?
The same principles apply. Swipe-to-delete gestures are easy to trigger by accident, so they especially benefit from an Undo message.
How long should items stay in the trash?
Long enough for mistakes to be noticed, often a few weeks. State the period clearly in the app, and tell people before items are permanently removed so nothing disappears by surprise.
If people in your business app keep deleting the wrong things, tell us which actions cause trouble.