Uh oh!
There was an error while loading. Please reload this page.
Tweak language toggler - #2566
Conversation
@moshfeu please try this branch. Live preview: https://affectionate-almeida-a9f620.netlify.com/en/ It might need some further styling tweaks, but I think it's a big improvement already. In order for ESC to close the menu, well need more JS to handle this, but let's leave it for later. /CC @nodejs/website (not sure if I can CC you guys, probably not) |
moshfeu
left a comment
There was a problem hiding this comment.
Looking very good to me.
If they will take that PR (I hope so), it will worth to keep improve this component.
XhmikosR
commented
Sep 25, 2019
Maybe I should wrap the |
* reduce the IDs usage * reduce data attributes * use classes * keyboard navigation works now
moshfeu
commented
Sep 25, 2019
It's very opinion based but I spoke with accessibility expert some time ago and he actually didn't recommended to use The code also says something like that. Navigation will keep a record in the history, while the code replace the record: nodejs.org/layouts/partials/header.hbs Line 61 in 2026c6a |
XhmikosR
commented
Sep 25, 2019
That's something that needs to change BTW, see #2541. |
XhmikosR
commented
Sep 25, 2019
Anyway, I'll freeze the changes for now so that this can be reviewed. I also dropped one data attribute and used |
moshfeu
commented
Sep 25, 2019
I'm not sure :) But let's see what they will decide.. |
Trott
commented
Sep 26, 2019
@nodejs/website Reviews? |
3imed-jaberi
left a comment
There was a problem hiding this comment.
Thank you @XhmikosR,
I understand that you want to simplify the code but I think that these chnages aren't necessary, they are simple by nature ...
XhmikosR
commented
Sep 26, 2019
Please try and understand the changes. This makes the language toggler way more accessible and keyboard navigateable. |
moshfeu
commented
Sep 26, 2019
@3imed-jaberi try to switch a language without the mouse, only keyboard. |
alexandrtovmach
commented
Sep 26, 2019
Looks good to me |
Fixes#2545