-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add an "ARIA label" field to the navigation module #7209
Conversation
I feel like this option should be available in many languages. I've had a project that focuses on an accessible navigation and I used translations for 5 different languages. If people would want to change it, they wouldn't need the field but could override the translation, wdyt? |
@zoglo you can use the |
I was just thinking about pre-delivery of the Aria-labels within translations so people don't need to set it up manually, they could still override it within this module 🤔. Maybe it's good the way it's implemented in the PR, especially for other types of navigations.. Going the long way of creating the language files for the label insert tag would just need a proper documentation. |
What do you want to do to pre-deliver here? The label will be be different for each navigation module. |
You are right, you already convinced me :D |
Having to create multiple modules just to change the label is quite inconvenient indeed. The |
But you already have to do that with several modules anyway - especially the navigation module. For example:
In each case you typically create another module - the root page dependent module selector - and then integrate that module in your page layout or a page's content. |
That's why I proposed having a fallback translation in place when the aria label is not set. If people would want it to be more accessible, they could use the new field you introduced in this PR. However, idk if it makes things worse or better because it would be so universal. |
It would make things worse in my opinion. If you have multiple modules on your site - e.g. the main menu in your header and a footer menu in your footer, they would both just say |
That’s right, the label must never be "menu" or "navigation", because screen readers already announce the element type. It would read "menu navigation" or "navigation navigation". The label should just be "main" or "top". |
Yes, because you change the module configuration → valid case. But if the configuration remains the same and only the label changes → not a valid case. At least in my opinion. |
It doesn't really matter what type of field you have to change. If you have 3 languages and 3 footer navigations (where the footer navigation is represented by one parent page in the site structure) you have to clone the navigation module 3 times and change one field accordingly. The rest of the configuration stays the same. And regardless: all the fields of a module are part of its configuration, not just specific fields. |
In #7218 I noticed that we already have a hardcoded |
This is no longer the case after the upstream merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
My only concern is that we can now set the aria label for the navigation menu and custom navigation - but not for the breadcrumb, which seems inconsistent. On the other hand you will likely only ever have one breadcrumb menu on the same page and thus the translated aria label should be fine 👍
And if it should turn out to be a problem, we can always add the label to the breadcrumb menu. |
Implements #6977