UI
← Home

Alert Dialog

A modal `role="alertdialog"` that interrupts to confirm a consequential action. It is described by its message, opens with focus on the safe (cancel) choice, traps focus and closes on Escape, and returns focus to the trigger — distinct from a generic Dialog by its role and initial focus.

  • Axe
  • Focus

Preview

Delete account?

This permanently deletes your account.

Installation

npx shadcn@latest add https://ui.publictheta.com/r/alert-dialog.json

Conformance

Verified against the @publictheta/ui-spec alert-dialog specification on both the React and vanilla reference implementations, across Chromium, Firefox, and WebKit.

  • Axe No WCAG 2 A/AA axe-core violations
  • Focus A visible focus indicator appears on keyboard focus (WCAG 2.4.7)

See the full conformance matrix across all components.