ARIA alertdialog Role
The alertdialog role marks a dialog that contains an urgent message and needs a response from the user, such as a confirmation before deleting something.
Description
The alertdialog role is a dialog with an alert message that requires a response, such as "Delete this file? This can't be undone", with Delete and Cancel buttons. When it opens, screen readers may announce it with a system alert sound, and they read the message straight away.
It needs an accessible name (with aria-labelledby or aria-label), and the message itself should be linked with aria-describedby so it is read when the dialog opens. When it appears, move focus to one of its controls, usually the least destructive one, keep focus inside while it is open and return it to the triggering element when it closes.
The native <dialog> element handles focus and modality for you; add role="alertdialog" to it when the dialog is an urgent confirmation.
Properties
- Category
- Window
- HTML equivalent
- None
- Accessible name from
- author
- Required parent role
- None
- Required child roles
- None
ARIA Attributes
- Required
- None
- Supported
aria-modal- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<element role="alertdialog">
Example
Browser Support
The following information will show you the current browser support for the alertdialog ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





