samedi 15 juin 2019

Use return key to toggle checkbox

I have built a navigation hamburger using a checkbox toggle to reveal/hide the menu so the menu works if the user is on a non-JS browser.

However, this means that keyboard users have to know to press space to toggle the menu, when the expected functionality for buttons would be the return key.

Is there an efficient way to toggle the checkbox with the return key if the user is focussed on it or shall I just leave it with the spacebar?




Aucun commentaire:

Enregistrer un commentaire