Skip to content

[LanguageNavigation v2] Remove nav element + improvement #2950

Open
@renow-luxembourg

Description

@renow-luxembourg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions