markafitzgerald1 / cribbage-trainer

Two-player cribbage discard and play improvement tool.
Mozilla Public License 2.0
1 stars 0 forks source link

Add keyboard shortcut input support #7

Open markafitzgerald1 opened 1 year ago

markafitzgerald1 commented 1 year ago

The current user interface allows standard web browser tab accessibility for keyboard user input. However, multiple keystrokes are required in order to indicate that a card is to be discarded. It would be helpful for users to be able to indicate that a card is to be discarded with fewer keystrokes. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-keyshortcuts looks like a potential path forward here.

markafitzgerald1 commented 1 year ago

My initial idea here was 123456 to toggle selection for discard on each of the dealt cards. However, single unmodified character shortcuts have accessibility issues ("If you must create keyboard shortcuts, avoid single letter keyboard shortcuts and common screen reader keyboard shortcuts."), so keyboard modifiers will be required.

markafitzgerald1 commented 4 days ago

As work on #6 progresses, this enhancement becomes more useful when working on a laptop.