Breadcrumbs Missing ARIA labelledby Element

Created on 7 February 2025, 16 days ago

Problem/Motivation

The template templates/navigation/breadcrumb.html.twig is missing the system-breadcrumb element referenced in the wrapping nav tag with the aria-labelledby value:

<nav class="breadcrumb" role="navigation" aria-labelledby="system-breadcrumb">

This is a minor accessibility issue, and is flagged up by many of the a11y tools.

The aria-labelledby property enables authors to reference other elements on the page to define an accessible name. This is useful when using elements that don't have native support for associating elements to provide an accessible name.

Proposed resolution

Themers and developers can either override the template in their sub-theme, or the following line can be added within the nav tag.

<h2 id="system-breadcrumb" class="breadcrumb__heading visually-hidden">{{ 'Breadcrumb'|t }}</h2>
🐛 Bug report
Status

Active

Version

11.0

Component

Code

Created by

🇬🇧United Kingdom robcarr Perthshire, Scotland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024