Web design and digital-business ideas grounded in real tasks.

A Destructive Button Needs to Name the Thing That Will Be Deleted

Web designer reviewing a fictional confirmation dialog on laptop.
AI-generated photographic illustration; not documentary photography.

A button labelled “Yes” is easy to build and surprisingly difficult to understand when several decisions are on screen. For a destructive action, the user should be able to identify what will happen without reconstructing the previous paragraph. “Delete draft” carries more meaning than “Confirm”.

Begin with the object and scope. Deleting one draft, removing a person from a shared workspace and closing an account have different consequences. A generic warning colour cannot explain those differences, especially for someone who does not perceive the colour or is using a screen reader.

Write the consequence before styling the dialog

For an invented project app, the prompt might identify the draft by name and explain whether deletion can be undone. The action button can repeat the meaningful verb and object, while a clearly labelled cancellation action leaves the draft intact. Avoid saying “permanent” if the application actually retains a recoverable item, and do not promise recovery the system cannot provide.

The W3C alert-dialog pattern and its working example provide accessibility guidance for an interrupting confirmation. Use the pattern appropriately rather than adding an alert dialog to every trivial action. Clear wording still needs correct focus handling, labelling and keyboard behaviour.

Test the complete sequence: opening the prompt, reading its title and description, choosing either action and returning to a sensible place afterward. Confirm that cancelling really leaves the data unchanged. Check what happens if the request fails or the user activates the control twice.

For a bulk action, state the count and scope where that helps prevent a mistake. If only some items can be deleted, explain the result instead of displaying an unconditional success message.

The design succeeds when a person can predict the consequence and understand the outcome. A dramatic warning box is less useful than a specific action, an honest recovery statement and a flow that behaves as described.