Building blocks

Delete with additional confirmation can be used for single-resource deletion or multi-resource deletion.

Use delete with additional confirmation for single-resource deletion if the resource cannot be recreated, or if deleting the resource poses a risk of breaking other infrastructure or causing an outage.

A
B
C
D
E
A
B
C
D
E

A.
Modal title

Use Delete together with the resource type. For example: Delete instance

B.
Reassurance

Make sure the user understands everything that is being deleted, and that the action is irreversible. Use important details associated with the resource being deleted, such as the resource name or other unique identifiers. Use bold font weight to expose the resource identifier. For example: Delete distribution CMRVMLFVHDVHU0 permanently? This action cannot be undone.

C.
Consequences

State the possible consequences of the action like severity, outcome, and potential cascading effects of the action. This helps the user be aware of the actual impact and scope of the destructive action. Use the warning alert format to present this information. If possible, add an external link to detailed documentation for users to consult.

D.
Confirmation text input field

Provide an additional layer of confirmation for users to validate the deletion. By default, the user should enter word confirm (with no case sensitivity). 

E.
Buttons

Allow users to execute the resource deletion or to exit the delete flow.

Additional prerequisites - optional

F
G
H

F.
Prerequisite actions 

Give users clear guidance on prerequisites and recommend best practices. For example, prompting users to disable the resource prior to deletion or create a snapshot to help recover from a deletion in the future. Any links leading to additional information on the prerequisites, or to prerequisite actions outside of the modal, should open in a new tab. Use the Box component with the variant property set to "small" to show the approximate deletion time if the deletion is not instantaneous.

G.
Confirmation text input field

If there is a single action that needs to be completed prior to deletion, disable the input field to focus the user's attention on that prerequisite task.

H.
Buttons

If there is a single action that needs to be completed prior to deletion, disable the primary button in order to focus the user's attention on that prerequisite task.

General guidelines

Do

  • Inform users about the severity and consequences of the delete action.
  • Give users additional contextual information about the resource being deleted, to adequately inform the deletion.
  • Use delete with additional confirmation only for high severity deletions, such as those that could break running infrastructure, or create an outage. Adding friction to low severity deletions can slow users down and create frustration. For lower priority deletions, use delete with simple confirmation instead.

Don't

  • Don’t use other patterns (such as popovers or a new page) to add confirmation to a delete action. Always use a modal.

Writing guidelines

General

  • Use sentence case. All words are lowercase except the first
    word in the phrase, proper nouns, acronyms, and service and feature
    names. Avoid capitalizing feature names unless absolutely necessary.

  • Use second person (you, your) when you address the user.

  • Localize the text on the user interface, including the confirmation text.

    • For example: If the interface is in French, all text including the confirmation text to be entered, should be written in French.

  • Use terminal punctuation for all modal text, except for any text in a list format.

Modal title

  • Use the word Delete together with the resource type. For example:

    • For a single resource: Delete instance

    • For multiple resources: Delete instances

Reassurance

  • Use the following text:

    • For single resource: Delete [object_type] [object_name] , [object_detail] permanently? This action cannot be undone.

    • For multiple resources: Delete [number of objects] ][object_types], permanently? This action cannot be undone.

       

  • If you are using the confirmation pattern to permanently end a process, as opposed to delete a resource, use the word Terminate and the process name, instead of "delete" and the resource name.

Consequences

  • Use text that explains the consequences of an action:

    • For a single resource, use this text: Proceeding with this action will delete [object_type] with all it’s content including [object_types] and can impact related resources like [object_types]. Learn more

    • For multiple resources: Proceeding with this action will delete [number of objects][object_types] with all it’s content including [object_types] and can impact related resources like [object_types]. Learn more

Examples

  • Delete cluster Cluster576 permanently? This action cannot be undone. Proceeding with this action will delete cluster with all databases and all automated snapshots at the end of their retention period. Any manual snapshots will retain until you manually delete them. Learn more

  • Delete 4 instances permanently? This action cannot be undone. Proceeding with this action will delete all databases in all 4 instances and all automated snapshots at the end of their retention period. Learn more

Confirmation text input field

  • To confirm deletion use the following text: To avoid accidental deletions we ask you to provide additional written consent. Type "confirm" to agree.

Button text

  • For the button that performs the action, use this text: Delete. If your deletion action is called something different, such as Terminate, then use the same verb in the modal title and button.

  • For the button to dismiss the dialog box without completing the action, use this text: Cancel.

Accessibility guidelines

General accessibility guidelines

  • Follow the guidelines on alternative text and Accessible Rich Internet Applications (ARIA) regions for each component.

  • Make sure to define ARIA labels aligned with the language context of your application.

  • Don't add unnecessary markup for roles and landmarks. Follow the guidelines for each component.

  • Provide keyboard functionality to all available content in a logical and predictable order. The flow of information should make sense.

  • Make sure you define ARIA labels for the selection inputs that are aligned with the language context of your application.

Related patterns and components

With delete patterns, users can delete existing resources.
Provide a layer of confirmation before deleting resources that cannot be easily recreated.
With the one-click delete pattern, users can quickly delete low-risk, non-critical resources.
A user interface element subordinate to an application's main window. It prevents interaction with the main page content, but keeps it visible with the modal as a child window in front of it.