martinkr/next-export-i18n

Accessibility issues with LanguageSwitcher component

Opened this issue · 1 comments

It looks like the <LanguageSwitcher> component cannot be accessed by keyboard. While it identifies itself as a button using the role attribute, since it's a span, the user can't tab to it. It also won't appear appropriately in the accessibility tree.

Can I ask why the component is using a <span> instead of a <Link> or <button>? Those would be more semantically appropriate and be more accessible to users (keyboard focus, able to activate by keyboard, appearing the accessibility tree, etc).

Hi @dagoss,

Thank you for your contribution. I've been busy with version 3 and the app router support.
I'll consider your suggestion for the next minor release version.

Cheers!