std-switch
std-switch copied to clipboard
Suggestion: Keyboard Interaction Arrow-keys
For someone with dexterity issues (or maybe just a dirty keyboard), the space bar toggle interaction can cause issues. If held, the space bar will repeat, triggering another state change.
I suggest an alternate method for changing switch state IN ADDITION to <space>.
The word "THUMB" was chosen as it seems to have been used for naming the indicator of a ranged input control.
<left-arrow> = move THUMB to "left" position of SWITCH
<right-arrow> = move THUMB to "right" position of SWITCH
<up-arrow> = move THUMB to "right" position of SWITCH
<down-arrow> = move THUMB to "left" position of SWITCH
Arrows repeating will not cause another state change. Range sliders already use this interaction.
Suggest the arrows do not map to on/off states but instead to the intended direction to move the ball in the gutter. The reason is that the native toggle control flips its on/off position for RTL languages.
While this is a visual difference, for blind RTL users this will keep parity with sighted users, particularly when visual / tech support is needed.
@aardrian Great point. I'll update my pseudo logic above.