nettofarah / react-flexible-switch

:on: Easy and Flexible React Switches
http://nettofarah.github.io/react-flexible-switch
54 stars 14 forks source link

Add invisible `<button>` for keyboard access #12

Closed rf- closed 7 years ago

rf- commented 7 years ago

Since the button doesn't respond to pointer events, it can only be activated with the keyboard.

I'm hoping that screen readers will be able to activate the button the same way the keyboard does, but I'm not 100% sure that actually works. It would be better if we could let the button respond to pointer events, but that would require more invasive changes and hopefully won't be necessary.

/cc @nettofarah, @danielvlopes

nettofarah commented 7 years ago

Thanks, @rf-. This looks great!