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
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
heddnAlso opened https://git.drupalcode.org/project/gin/-/work_items/3598613. Use of an LLM.
Comment #4
heddnComment #5
boromino commentedThe 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.
Comment #6
mherchelNot 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...
Comment #7
mherchelLooks like the work is already done. Looks good to me, but I'll let someone else RTBC it, so I can commit.
Comment #8
mherchelFollowup created at #3619804: Determine if menu templates are in use by Admin theme
Comment #9
f0ns commentedDiff is exactly two lines, aria-toolbar-link__labelledby → aria-labelledby, IDs already present.
Looks good.
Comment #10
f0ns commentedComment #12
mherchelCommitted and pushed 141cdc1f0a3 to main. Thanks!
Comment #14
mherchel