This accessibility report identifies a moderate-severity violation of WCAG 1.3.6 (Identify Purpose) where multiple informational message blocks utilize the same contentinfo landmark role without unique identifiers. When a page contains multiple landmarks of the same type, screen reader users cannot easily distinguish between them unless each is given a unique name via aria-label, aria-labelledby, or a title attribute. In this case, the .messages--info containers lack the necessary programmatic labeling to help users understand their specific purpose relative to other landmarks on the page. To resolve this, the Drupal message templates should be updated to provide unique labels for each message block—or more appropriately, the contentinfo role (reserved for the page footer) should be removed entirely in favor of ARIA live region roles like status or alert, which are better suited for system notifications.

Note: AI was used to create the scripts that created this scanner and the corresponding report.

Pattern ID: DRU-338C31F8
Rule: axe-core - landmark-unique
Axe Rule URL: https://dequeuniversity.com/rules/axe/4.11/landmark-unique
Severity: Medium (axe impact: moderate)
WCAG SC: 1.3.6 - Identify Purpose (Level A)
Frequency: 2 of 452 pages (0%)
Selector: .messages--info
XPath: //[contains(@class,"messages--info")]
*Parent Context:
N/A

Affected URLs (full list):

Conditions:

  • admin (dark desktop, dark mobile, light desktop, light mobile), claro (dark desktop, dark mobile, light desktop, light mobile)

HTML Snippet

&lt;<span class="hljs-keyword">div</span> role=<span class="hljs-string">"contentinfo"</span> aria-labelledby=<span class="hljs-string">"message-info-title"</span> <span class="hljs-built_in">class</span>=<span class="hljs-string">"messages-list__item messages messages--info"</span>&gt;

Description

Fix any of the following:
The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable

Steps to Reproduce

  1. Go to https://drupal-core.ddev.site/message
  2. Use the matching context from Conditions: admin (dark desktop, dark mobile, light desktop, light mobile), claro (dark desktop, dark mobile, light desktop, light mobile)
  3. Open browser DevTools and run axe.run() in the Console.
  4. Confirm rule landmark-unique on selector .messages--info.

Expected Behaviour

Element and interaction meet the mapped WCAG success criterion.

Actual Behaviour

Fix any of the following:
The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable

Impact

users with disabilities

Suggested Fix

See axe documentation.

Additional References

Testing Environment

Tracking IDs

  • Pattern ID: DRU-338C31F8
  • Instance IDs: INS-72820C3E, INS-C1AF88AE

Comments

mgifford created an issue. See original summary.

mgifford’s picture

Results of playwright axe scan from https://github.com/mgifford/drupal-core/blob/main/reports/PATTERN-REPORT...

Theme and style elements explicitly exposed using:
https://www.drupal.org/project/theming_tools
https://www.drupal.org/project/form_style

There are efforts to put in unique identifiers that will hopefully make this easier to search for and to find if there are issues that re-emerge.

It is an attempt to follow the best practices defined here:
https://mgifford.github.io/ACCESSIBILITY.md/examples/ACCESSIBILITY_BUG_R...

mgifford’s picture

Issue summary: View changes