ARIA Messages
Component ID
2469615
Component name
ARIA Messages
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
This module adds an ARIA landmark role and aria-label attributes to the default Drupal messages output for errors, warnings, and status messages. These attributes help prompt assistive technology (AT) such as screen readers to announce these errors on the page load (or introduction of the error to the DOM for messages introduced by AJAX). This announcement serves as an equivalent of the message being prominent to sighted users through colouring and position at the top of the page.
The module backports some of the accessibility work done by jessebeach which is part of the core messages template in Drupal 8.
Changes to the default output
- The messages container
divnow has an ARIA landmark set:role="contentinfo"as well as an appropriate label set, such as:aria-label="Error message". - Error or status messages are wrapped in an additional
divand given an appropriate ARIA role attribute such asrole="alert"orrole="status"
