You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.
The Problem
Keyboard users are currently not able to interact with or toggle a
Switch
.The Solution
Within
src/scripts/switch.js
, add atabIndex="0"
andonKeyPress={e => (enabled ? onClick(e) : onDisabledClick(e))}
to the returned containingdiv
.Bonus Points
Add a proper keypress handler that only listens for
enter
(keycode13
) andspace
(keycode32
).The text was updated successfully, but these errors were encountered: