question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language picker inaccessibility

See original GitHub issue

Affected page

Language picker in main menu for curriculum.

Discussion

The language picker in the main menu in the curriculum is currently inaccessible to keyboard only users because the change is triggered as soon as you press the down arrow key (which triggers a change event causing the language to be changed immediately). There really is no good way to use a <select> here if you want the change to be triggered without clicking a separate button to initiate the change (this just isn’t how selects were intended to operate). You basically have to implement an alternative solution that is accessible to keyboard users.

I have spent the past few days creating an alternative, accessible solution, and am just about ready to submit the PR, but before I do that I can’t help thinking that this might be over-complicating the issue and there is a better way. I’d like to suggest that we move the language picker to the user’s settings page. If we did that then we could have a button that initiates the change and then we could use a plain old <select> which would reduce the complexity of implementing this functionality considerably. We could still include the language picker in the main menu, but it would just be a link that takes the user to their settings page.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bbsmoothcommented, Feb 16, 2022

If we change the “English” in the menu to a button with area “Change Language”, it should do the trick?

You are reading my mind. That’s exactly what I did (before I even read this).

1reaction
bbsmoothcommented, Feb 14, 2022

Only every time you complete a challenge/project.

Ahh, thank you. I don’t complete a lot of challenges so this example didn’t come to mind. Yes, this is what I am referring to when talking about a modal dialog for the language picker. I do agree that they are often misused and this contributes to their bad rep, but obviously we wouldn’t be misusing it here since we would only open it on user interaction. As for usability, I don’t see too much of an issue in this case. Dialogs can often enhance accessibility by focusing the user on a specific task and making it much clearer what the intent and results of their actions will be. In this case I think having a button that says “Change Language” (or whatever) is a little clearer than causing the change by interacting with the item directly in the list.

Just to be clear, while I think a modal approach might be a little better I’m perfectly fine with keeping it entirely within the menu and using a custom submenu approach. I will submit my PR soon and you can check out what I’ve done and then we can go from there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create an accessible language picker - CodyHouse
In this article, we'll go through the steps of creating a custom language picker in CSS and JavaScript, and keeping it accessible.
Read more >
Designing A Perfect Language Selector UX
It's worth noting that the main disadvantage of tabs is that they make the content inaccessible with an in-browser search (well, for now)....
Read more >
Does Accessibe Work? - Access Armada
One easy to understand example is the language picker that allows users to select from multiple languages that the service supports.
Read more >
Accessible Datepickers Roundup - DigitalA11Y
Accessible date pickers or accessible calendar widgets as they are commonly referred to, are one of the most discussed topics between developers, designers....
Read more >
Accessibility Denied. Understanding Inaccessibility and ...
2022 selection and editorial matter, Hanna Egard, ... Paul present three cases of language inaccessibility during the COVID-19 out-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found