Description
Feature Request
Is your feature request related to a problem? Please describe.
In a recent accessibility audit, it was observed that the LanguageNavigation component doesn't fully respect the RGAA/RAWeb accessibility guidelines for French-speaking countries.
Main relevant problem :
- LanguageNavigation should not use the nav tag as it's not considered as a navigation following the Glossary definition (see below)
Other improvement nice-to-have requested by some of our Client :
- Automatically hide the component if the website is in only 1 language
- Display the ISO code instead of the full language name (e.g EN instead of English, FR instead of FRENCH)
- Add a parameter to display the language as a dropdown list using the disclosure design pattern (we have some website with more than 15 languages)
Describe the solution you'd like
Replace the nav element by a div. The aria-label attribute need to be transferred to the ul element to be taken into account by accessibility tools.
Are there alternatives?
An alternative can be to use the role="presentation" instead of role="navigation" to remove the element semantic. But it isn't super clean ...
Documentation
Glossary : https://accessibilite.public.lu/en/raweb1/glossaire.html#menu-and-navigation-bar