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

  1. The messages container div now has an ARIA landmark set: role="contentinfo" as well as an appropriate label set, such as: aria-label="Error message".
  2. Error or status messages are wrapped in an additional div and given an appropriate ARIA role attribute such as role="alert" or role="status"