Alert
An alert is a short, important message that is announced without moving keyboard focus. It does not ask the user to answer at once.
The workspace could not reach the server. Keep editing or retry when the connection returns.
A real example
A background save fails while the user keeps typing in an editor. An alert says the changes were not saved and shows how to recover. If the user must stop and choose an answer, use an alert dialog instead.
Main parts
- 01important message
- 02live announcement
- 03recovery path
Use it when
Use this term for important, time-sensitive status that should be announced without taking focus away.
Do not use it when
Do not use alerts for normal updates, old messages, or content already on the page when it loads.
Name used in code
role=alert / aria-live=assertive Before you ship
Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states.
Outcome: Use Alert to solve this user need without losing the current context. User context: A background save fails while the user keeps typing in an editor. An alert says the changes were not saved and shows how to recover. If the user must stop and choose an answer, use an alert dialog instead. Recommended pattern: Alert. Why it fits: Use this term for important, time-sensitive status that should be announced without taking focus away. Do not use it when: Do not use alerts for normal updates, old messages, or content already on the page when it loads. Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary): It is official for that source. Other platforms or teams may use the term in another way. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Check this request
Review the current use of Alert. Definition: An alert is a short, important message that is announced without moving keyboard focus. It does not ask the user to answer at once. Release checks: Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.