Closed VictorCazanave closed 6 years ago
Hey, I don't really remember as the PR was one year ago. I can take a look into it when i have a bit of free time.
I think what put me off was the phraseI'm not 100% sure on that front.
. It is not a great benchmark for things that are used by hundreds of people 😄
Haha! Okay 😄I'll work on it when I have time.
I made a quick test on codepen and it seems that there is no need to check whether component is focused or not. However it doesn't work on IE 11 (nothing happens when pressing the space bar) 😞 so I'll search a way to fix it.
Nice, thanks 👍
I've updated the codepen with a solution based on this article using opacity: 0
instead of display: none
to hide the <input/>
.
Then the <input/>
is still accessible/focusable and natively reacts to keyboard events (no need to add @keydown.space
) even on IE 11.
I'm not an expert in accessibility but I think we can also remove the role="checkbox"
and the aria-checked
.
I may have time to make a PR this week. It will be more clear than explaining the code modification 😄
Is there any reason why https://github.com/euvl/vue-js-toggle-button/pull/26 has not been merged? I think it would be great to support keyboard navigation.
PS: Sorry for opening a new issue but I don't know if you get the notifications from closed PR 👼