Rethink language selector again 😀
See original GitHub issueWhile working on aligning all of the pieces of the page on the various viewport sizes I realized we have a bit of a UI/UX problem on mobile due to the components we have in our overall page header section. This is best described via a screenshot of a reference page on mobile:
As you can see from the above, not only does it feel cluttered/overwhelming, it pushes the actual content of the page further and further down. I, therefore, started rethinking how we surface a language selector.
First, a general question. Yari 1 will ship with translations but, we will link to frozen translations from the language selector until we relaunch translations. Secondly, translations will have a banner that indicates that the translation is frozen and, will offer a link back to the up to date English version. Third, there will be a period of time, 4-6 months perhaps, between Yari 1 and the relaunch of translations where the frozen translations for some pages will get out of date so, do we want to actively provide the means to link to them?
With all of that, should we perhaps consider kicking this can down the road and decide/work on its implementtion after the initial launch?
With that said and out of the way 😀 and assuming you are still reading, I do have a possible proposal we can implement in time for Yari 1. Here is my thinking around this problem.
- Users get to translated content, as most content, from an external search engine that returned results in their native/browser/OS language. i.e. very few people change their language while just generally browsing MDN (I know, except changing it to English, see point 2 below 😀)
- The most asked for feature is to have a setting to always display MDN in English. This then also suggests that should a user want to change the language, they are going to want to switch to English.
- This is not a commonly used part of MDN and as such, should definitely not be so prominent and take up so much of our screen real estate.
With all of that in mind, I broke this down into the following statement:
Provide the ability to change the current language of an MDN page in an easy, accessible, non-obtrusive manner. Make the most common use case quickly accessible.
From a UI perspective I see the above implemented as follows:
Mobile
Tablet
Desktop
Couple of notes about the above:
- The icon used is the universal language icon for selecting a different language: http://www.languageicon.org/
- But, for accessibility the heading “Change language” is only visually hidden on mobile and tablet and,
- The icon is a link and will have
title
andaria-labelledby
attributes that clearly describes the links intent i.e. “Select your preferred language” - The
English
link, will only be shown if you are no already on an English page and as such, change to the English version when shown - The language icon will link to the language selector in the footer as can be seen in the screenshot below:
I would really appreciate everyone’s input here. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (12 by maintainers)
Top GitHub Comments
Just a heads up: The language selector is currently unaligned for me on Firefox 84 / Arch Linux. Instead of opening a new issue I’m just leaving this comment here, I hope that’s okay.
Thanks for reporting. I opened an issue for this. I am going to style our select elements better now that we have settles on a solution for this component. Along with this, I will also address the issue here.