Accessibility language switch block: role="navigation"

Created on 8 November 2022, about 2 years ago
Updated 3 June 2023, over 1 year ago

Problem/Motivation

After an accessibility audit by an authority on Accessibility (www.Anysurfer.be) it has become clear that role="navigation" should be removed from language switcher blocks.

The comment was: "r is geen reden om in de accessibility tree van het taalkeuzeblok een navigatieblok te maken."
"> There is no reason to create a navigation block in the accessibility tree of the language switcher block".

Steps to reproduce

Have a multilingual Drupal with a language switcher.

Proposed resolution

Review patch.

Patch removes the role="navigation" addition from the language blocks.

Remaining tasks

Review

Release notes snippet

For accessibility reasons removed role="navigation" from language blocks.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
Language systemΒ  β†’

Last updated 3 days ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡§πŸ‡ͺBelgium Mschudders

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • Needs accessibility review

    Used to alert the accessibility topic maintainer(s) that an issue significantly affects (or has the potential to affect) the accessibility of Drupal, and their signoff is needed (see the governance policy draft for more information). Useful links: Drupal's accessibility standards, the Drupal Core accessibility gate.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States andystitt829

    I tested the provided patch, and it works.

    Before the patch:

    After the patch:

    I think it's a good idea to not have the language switcher block have the navigation role attached to it as a default. Depending on how it's implemented, it could be a navigation menu on its own, or it could not.

    For example, I inserted it in the header and kept the block title. This made it a navigation menu on its own.

    However, if someone inserted it into the navigation menu, didn't keep the block title, and styled it to look like other items in the navigation menu, then it would be part of the larger navigation menu and not one on its own.

Production build 0.71.5 2024