Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Non-distinct labels for dashboard nav items containing subitems #15006

Closed
JamieC24 opened this issue May 16, 2024 · 2 comments
Closed
Assignees
Labels

Comments

@JamieC24
Copy link

What happened?

Description

When using the Craft admin system as a screen-reader user, buttons to expand navigation items that have a sub-navigation are simply labeled “Open subnavigation”. When there are several navigation items that contain subnavigation, the same label is applied to each of them, making it unclear to the user which subnavigation they’re opening

Steps to reproduce

  1. Activate VoiceOver (if you’re using a Mac) or Narrator (if you’re using a Windows machine)
  2. Navigate to https://cms-bookshare.studio24.dev/admin and log in
  3. Tab through the navigation in the sidebar of the dashboard until you reach an item with a subnavigation

Expected behaviour

The screen-reader should indicate to the user which nav item the subnavigation is associated with (i.e “Open Subnavigation - GraphQL”)

Actual Behaviour

The screen-reader reads out “Open subnavigation”

Proposed solution

I have been able to fix this locally by changing line 83 of the global-sidebar.twig template to the following:

{{ 'Open subnavigation' |t('app') ~ ': ' ~ item.label }}

Craft CMS version

Craft CMS Pro 5.1.0

PHP version

8.2.18

Operating system and version

MacOS Sonoma 14.4.1

Database type and version

PostgreSQL 15.8

Image driver and version

No response

Installed plugins and versions

CK Editor 4.0.4

Postmark 3.1.0

@gcamacho079
Copy link
Contributor

Thanks for reporting this issue, @JamieC24. I’ve raised a PR for this.

@brandonkelly
Copy link
Member

Craft 5.2.0 is out with a fix for this. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants