A red button does not explain what will disappear.

“Delete project” might remove a shortcut, move a project to trash, or permanently erase files used by an entire team. Those are different operations. They need different interfaces.

Destructive action UX starts with the consequence: what changes, who is affected and whether the result can be reversed.

Once those decisions are clear, the choice between confirmation, undo and archive becomes easier.

Define what the action actually does

Before designing a confirmation dialog, write down the operation in plain language.

For a hypothetical project-management product:

Action Intended behavior
Remove from favorites Remove a personal shortcut; keep the project
Archive project Remove it from active work; retain its contents
Move to trash Remove it from ordinary views; allow restoration under a defined policy
Delete permanently Remove it through the product’s permanent-deletion process

These definitions are examples. Products use these terms differently, which is exactly why the interface needs to explain its own behavior.

Do not call an operation “Archive” if it destroys the information needed to restore the item. Do not promise permanent erasure if the product only removes a record from the active interface.

The label should describe the operation the system performs.

Match friction to the consequence

A confirmation dialog adds a decision before an action. That decision is useful when the user has something meaningful to review.

For a small, easily reversible change, a dialog may add little value. For an operation affecting shared work or information that cannot be restored, a deliberate review step can be justified.

A practical decision framework:

Situation Pattern to consider
Remove a personal shortcut Perform the action with clear feedback
Hide completed work from an active view Archive with a discoverable restore action
Remove recoverable content Move to trash and explain restoration
Delete irreplaceable content Review consequences before final confirmation
Affect many records or other users Show the scope and consequences explicitly

This is an editorial framework, not a universal accessibility rule.

WCAG 2.2’s Error Prevention criterion covers specified actions involving legal commitments, financial transactions, user-controllable stored data and test responses. It provides alternatives involving reversibility, checking or confirmation. It does not prescribe a confirmation modal for every delete button. W3C

Choose the protection that fits the actual operation.

Make confirmation resolve uncertainty

“Are you sure?” asks the user to confirm a decision without supplying much information.

A useful confirmation identifies:

  • The item or collection affected
  • The operation being performed
  • Important consequences
  • Whether recovery is available

For example:

Permanently delete “Spring Campaign”?
This will delete the project and its 12 uploaded files. Team members will lose access. You cannot restore it through this product.
Cancel · Delete project

Every claim in that message needs to be true. The file count must reflect the operation’s scope. The access consequence must match the permission model. The recovery statement must match the service.

Avoid hiding the important consequence in generic language such as “This may affect associated data.”

Name the affected data when the product can determine it. If the impact cannot be established reliably, resolve that uncertainty before presenting a confident confirmation.

Use button labels that name the action

A confirmation should remain understandable when someone scans only its buttons.

Prefer:

  • Delete project
  • Move to trash
  • Archive invoice
  • Keep editing

Labels such as Yes, OK and Proceed depend heavily on the surrounding sentence. They become particularly awkward when the question contains a negative, such as “Do you want to cancel deleting this item?”

GOV.UK’s button guidance recommends text that describes the action the button performs. Its warning-button pattern is intended for serious destructive consequences. These conventions are useful references, while the specific visual treatment should fit the product’s own design system. GOV.UK Design System

Color can reinforce the meaning. The wording must carry it.

Treat undo as a product capability

An Undo button is a promise that the system can reverse the action.

That promise needs more definition than “put the row back.”

For a deleted project, restoration might need to recover:

  • The project record
  • Files and relationships
  • Membership and permissions
  • Its previous location
  • Relevant settings

It may not reverse every side effect. An email already delivered to a collaborator cannot be made unread by restoring the project.

Before offering undo, define what it restores and what remains changed. If the operation only hides an item locally while a server request is pending, distinguish cancelling that pending action from reversing a completed operation.

The interface should use the promise the backend can support.

For collaborative products, also decide what happens if the context changes before restoration. A parent folder might have been removed, or the person restoring the item might no longer have access.

These are product decisions that belong in the recovery flow.

Avoid making recovery depend on a disappearing message

A notification that says “Deleted. Undo” can be convenient. It is a weak recovery route if it disappears before someone notices it or reaches it with a keyboard.

Where practical, provide a persistent route such as a trash view or activity history. The notification can offer a shortcut to the same capability.

If recovery is available only during a short window, that deadline is part of the interaction. WCAG’s Timing Adjustable criterion addresses content-imposed time limits and provides requirements and exceptions for them. A timed undo design needs to be evaluated against its actual behavior rather than assumed accessible because the message remains visible for several seconds. W3C

A practical design question is whether the message can disappear while the recovery action remains available elsewhere. That separates transient feedback from the user’s ability to repair a mistake.

Show the real scope of bulk actions

“Delete selected” becomes risky when selection spans filters or pages.

A user may see ten rows while the operation affects hundreds of matching records. The interface needs to explain which set is selected before the final action.

Distinguish:

10 customers selected on this page

From:

All 286 customers matching this filter selected

The confirmation should use the same scope definition.

Also decide how selection behaves when the user changes filters. Does the selection persist? Does it clear? Can selected items become invisible?

There is no single answer for every product. There should be one documented answer for the interface being built.

For an operation based on a changing query, determine whether it acts on a fixed set captured at confirmation or on whatever matches when execution begins. Otherwise, the confirmation count and the affected records may describe different sets.

Design pending, failed and partial outcomes

The interaction does not end when the user presses Delete.

A useful state model includes:

State What the interface needs to communicate
Awaiting confirmation Scope, consequences and available choices
Processing The operation has started
Confirmed success What changed and how to recover, if supported
Confirmed failure What did not change and what can happen next
Unknown outcome The result could not be confirmed
Partial success Which items changed and which did not

A timeout is not enough evidence to say that nothing was deleted. The server may have completed the operation before the response was lost.

For an uncertain result, use wording that reflects what is known:

We could not confirm whether the project was deleted.
Refresh the project list to check its current status.

That message is appropriate only when refreshing can actually establish the state. Some operations need a dedicated status check.

For bulk actions, avoid a single success notification if only some records were processed:

8 projects moved to trash. 2 could not be moved.

Keep the failed items identifiable and provide a recovery action that matches the cause. Do not invite an automatic retry of the entire batch without considering items already processed.

Preserve keyboard context

A destructive action often removes the control that triggered it.

If someone deletes a row using its action button, that button disappears with the row. The interface needs a logical destination for focus, such as the next row’s relevant control or the list heading when no items remain.

For confirmation dialogs, define the opening focus, keyboard behavior and closing destination. A serious confirmation may use an alert-dialog pattern when an important message requires a response. W3C’s ARIA Authoring Practices describes that pattern and its accessible naming and description requirements. Adding the role alone does not implement the interaction. W3C

For an irreversible action, placing initial focus on a non-destructive choice is a reasonable design default. Test it within the complete workflow rather than deciding from a static screenshot.

Write the recovery policy into the specification

A delete-flow handoff should document behavior as clearly as layout.

For example:

Action
Move a project to trash.

Scope
The selected project and its attached files.

Before execution
Show the project name and explain who loses ordinary access.

Recovery
Authorized users can restore the project from Trash.
Restoration recovers files and existing project membership.

During execution
Show progress and prevent duplicate activation in this interface.

On success
Remove the project from the active list.
Provide a link to Trash.

On failure
Keep the project visible when failure is confirmed.

On uncertain outcome
Check the operation status before claiming success or failure.

Focus
Move to the next project control, or the list heading if empty.

This example deliberately leaves retention duration unspecified. A real specification must include the product’s actual policy, ownership rules and exceptions.

Do not fill those gaps with convenient copy.

Test mistakes and recovery together

Test more than the successful deletion:

  1. Open the confirmation for the wrong item and cancel.
  2. Complete the action using only the keyboard.
  3. Remove the last item in a list.
  4. Restore an item through the supported route.
  5. Navigate away and return before attempting restoration.
  6. Simulate a failed request and an uncertain response.
  7. Run a bulk action with partial failure.
  8. Change permissions or parent context before restoration.

For every case, compare the message with the stored result. The interface should neither hide a completed action nor announce a result the system cannot confirm.

A reliable destructive-action flow makes the affected scope clear, gives the user an appropriate chance to reconsider and provides recovery that works as described. The red button is only one part of that design.

Sources

Sources checked on November 8, 2026. Interface examples and the decision framework are illustrative recommendations, not client results or a complete accessibility assessment.