Resonance Logo

Alert Dialog

A modal dialog that interrupts the user to communicate critical information and requires an explicit confirm or cancel response.

Demo

Activate the trigger button to open the alert dialog. Use Tab to move between the dialog's action buttons. Press Escape or activate a button to close it. Notice that focus is trapped inside the dialog while it is open.

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Overlay / Backdrop — a full-screen layer that obscures background content and communicates that the page is blocked until the user responds
  2. Dialog Container — the element with the alertdialog role that contains all dialog content and holds programmatic focus
  3. Title — a heading or labelling element that names the dialog and is associated with the container so screen readers announce it on focus entry
  4. Description — the message explaining the situation or consequence the user needs to respond to
  5. Action Buttons — the confirm and cancel controls that dismiss the dialog and communicate the user's intent

Accessibility Behavior

Common Mistakes

Why This Matters

Alert dialogs represent high-stakes moments in an interface — confirming a deletion, acknowledging an error, or accepting a warning. When focus is not managed correctly, keyboard users may be unable to interact with the dialog at all, or may accidentally trigger actions in the background. When the dialog lacks a proper title and role, screen reader users receive no indication that they are inside a modal requiring a response. Correctly implementing this pattern ensures all users can make informed decisions before an irreversible action takes place.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation