Alert messages are a special case of notification messages that are used to report a critical error or warning.
They grab the reader’s attention through a short message that is displayed all at once on the screen, without reloading the page or interrupting the activity.
Core HTML base
When the page is loaded
When the alert is triggered
ARIA roles, states and properties
role="alert" attribute must be applied to the container of the alert message.
role="alert" attribute must be statically present when the page is loaded.
This container must then be dynamically populated when the alert is triggered.
Alert messages must not disappear automatically from the screen after a certain time.
They must disappear only following a deliberate action by the user (closing “X”, display of a new page, etc.).