Alert messages

Summary

Principle

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.

This sheet is based on the “Alert” design pattern detailed in W3C’s WAI-ARIA 1.1 Authoring Practices.

Core HTML base

When the page is loaded

<div role="alert"></div>

When the alert is triggered

<div role="alert">
  <p>Seating may not be available on this trip.</p>
</div>

ARIA roles, states and properties

The role="alert" doit être appliqué sur le conteneur du message d’alerte.

Comportements attendus

L’attribut role="alert" attribute must be statically present when the page is loaded.

This container must then be dynamically populated when the alert is triggered.

Note

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.).

Comments

Back to top