Problem/Motivation
The language switcher block has a navigation landmark region navigation role, but the region has no accessible name.
An accessible name is not strictly needed for all landmark regions. However in situations where there are multiple landmark regions of the same type on the page, the best practice is to differentiate these with an accessible name. We already do this for our menu and breadcrumb blocks.

Proposed resolution
Add an aria-labelledby reference to the language switcher navigation landmark region, pointing to the nested visually-hidden heading. Follow the same pattern as we already use for menu blocks.
Remaining tasks
patch
User interface changes
Adds an accessible name to the language switcher navigation landmark region, so screen reader users can differentiate it from other navigation landmarks on the page.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3049125-2-language-switcher-unlabelled-navigation-landmark-region.png | 131.92 KB | andrewmacpherson |
Issue fork drupal-3049125
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andrewmacpherson commentedAdding a screenshot of the landmark regions on a recipe page in Umami. The menu and breadcrumb navigation regions have accessible names to differentiate them, but the language switcher is just a "navigation".
Comment #3
andrewmacpherson commentedComment #4
andrewmacpherson commentedWhoops. This isn't actually a language-of-parts issue, I edited the wrong one.
Comment #7
andrewmacpherson commentedA good one to work on During the Accessibility Bug Bash during DrupalCon Global 2020 this week
Comment #15
mgiffordBug ID: DRU-48550bb9 (instance) / DRU-9ee9dcbd (pattern)
URL: http://localhost/ XPath: //div[@id="block-test-language-block" and @role="navigation"]
Full DOM path: /html/body//div[@id="block-test-language-block" and @role="navigation"] WCAG SC: 4.1.2 - Name, Role, Value (Level A)
Rule: manual landmark-name check - landmark-name Severity: Medium Frequency: Pattern-level; language provider blocks rendered as navigation landmarks
Screen type: desktop
More tests and info in:
https://github.com/mgifford/drupal-core/blob/main/patches/ISSUE-QUEUE-CO...
This contribution was prepared with assistance from an AI coding tool.
Comment #19
mgiffordComment #20
smustgrave commentedLeft comments on the MR. Thanks!
Comment #21
mgifford@smustgrave - I will give you a firm "maybe".
I don't have an answer to those questions/suggestions. They seem reasonable.