Alert
An inline message panel for important context that the user should notice but doesn't need to dismiss. Four semantic variants — info, success, warning, danger — each with the appropriate aria-live politeness.
Variants
Tip
Press X to view the world map.
Saved
Your game has been saved.
Low HP
Use a Heal potion soon.
Game Over
Your party has fallen.
Accessibility notes
- Renders as
role=“alert”witharia-live=“polite”for info/success andassertivefor warning/danger — assistive tech interrupts the user for urgent variants only. - Use Alert for messages that appear in response to a user action and should be noticed but don't block. For blocking confirmations, use Dialog.
- Don't put interactive controls inside an Alert — accessibility tools may not announce them in context. If the user needs to act, use a Toast or Dialog instead.