HTML language switcher accessibility
Is there any aria-something or a role to add in a language switch link ? For exemple, I put two links in the footer to change the current language.
<a href="/language/switch/fr">Fr</a>
<a href="/language/switch/uk">Uk</a>
I there any semantic tag to add to this links ?
Example:
<a href="/language/switch/fr" lang="fr" hreflang="fr">Fr</a>
See https://www.nomensa.com/blog/2010/7-tips-for-multi-lingual-website-accessibility for more info.
lang attribute doc:
The
lang
global attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be written in by the user.
hreflang attribute doc:
Hints at the human language of the linked URL. No built-in functionality. Allowed values are the same as the global
lang
attribute.