Problem/Motivation

menu-region--middle.html.twig and menu-region--top.html.twig use
aria-toolbar-link__labelledby instead of aria-labelledby — not a valid ARIA attribute,
so it is ignored and the toolbar menu <ul>s have no accessible name.

Steps to reproduce

Set Gin as the admin theme, load any admin page, and inspect the .toolbar-block__content lists.

Proposed resolution

Rename the attribute to aria-labelledby. The referenced IDs already exist
(<h2 id="{{ menu_id }}"> and <h2 id="{{ menu_heading_id }}">), so no other change is needed.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3615331

Command icon 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

heddn created an issue. See original summary.

heddn’s picture

heddn’s picture

Status: Active » Needs review
boromino’s picture

Status: Needs review » Postponed (maintainer needs more info)

The two templates exist in /core/themes/default_admin/templates/navigation with aria-toolbar-link__labelledby. In gin they are defined in gin_theme() and used in GinNavigation::getNavigationBookmarksMenuItems() and GinNavigation::getNavigationAdminMenuItems(). However, they don't seem to be used in default_admin. Loading any admin page, aria-toolbar-link__labelledby doesn't appear.

mherchel’s picture

Status: Postponed (maintainer needs more info) » Active

Not sure if these templates are in use, but this issue is a blocker.

I'm going to fix the aria attributes and open a followup to see if they're ever called.

Note this code came over from Gin. See https://git.drupalcode.org/project/gin/-/blob/5.0.x/templates/navigation...

mherchel’s picture

Status: Active » Needs review
Issue tags: +Accessibility

Looks like the work is already done. Looks good to me, but I'll let someone else RTBC it, so I can commit.

mherchel’s picture

f0ns’s picture

Diff is exactly two lines, aria-toolbar-link__labelledby → aria-labelledby, IDs already present.

Looks good.

f0ns’s picture

Status: Needs review » Reviewed & tested by the community

  • mherchel committed 141cdc1f on main
    fix: #3615331 Invalid ARIA attribute aria-toolbar-link__labelledby on...
mherchel’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Committed and pushed 141cdc1f0a3 to main. Thanks!

  • mherchel committed e0b53b2a on 11.x
    fix: #3615331 Invalid ARIA attribute aria-toolbar-link__labelledby on...
mherchel’s picture

Status: Patch (to be ported) » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.