- πΊπΈ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.
- πΊπΈUnited States dcam
I converted the patch in #2 to an MR and added a test.
- π¨π¦Canada mgifford Ottawa, Ontario
I'm not sure that this patch puts us ahead.
Maybe.
The comment from the Belgium audit is "There is no reason to create a navigation block in the accessibility tree of the language switcher block". Which isn't to say it is a WCAG error, as much as it isn't needed. Maybe it isn't needed, but maybe that depends on the site setup.
Is this just two languages? Would it need it (in the view of Anysurfer.be) if there were 5 languages?
I usually try to find some documentation for this.
There is no minimum that I could find in:
- https://wai-aria-practices.netlify.app/aria-practices/
- https://udn.realityripple.com/docs/Web/Accessibility/ARIA/Roles/Navigati...
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Referenc...
- https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
@andystitt829 you make good points here. As you say, "it could be a navigation menu on its own, or it could not."
But if it is going to be brought into another menu, it wouldn't be that difficult to strip out the nav function.
I do think we need to document how to build a list involving the language switcher where the 'role="navigation' is removed, alternatively, how we add 'role="navigation' should we change the default as per this patch.
Not having the 'role="navigation' would be a slight simplification of the code. It may not be needed. I do think it would be useful to have some documentation on this with some actual user testing though.
- πΊπΈUnited States smustgrave
I'm moving to NW for #13 to be added to summary.