pattern-lab / styleguidekit-assets-default

The static assets for the default StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.
http://patternlab.io/
MIT License
35 stars 67 forks source link

Make keyboard shortcuts optional #85

Open bradfrost opened 6 years ago

bradfrost commented 6 years ago

Per this conversation: https://twitter.com/melaniersumner/status/917499349038358529

It might make sense to make keyboard shortcuts an optional feature rather than a built-in one. I personally don't use them, and it sounds like there are some accessibility issues that arise with them.

@bmuenzenmeyer, do you know if keyboard shortcuts are already configurable, or would that need built? If it needs built, I can think of an easy way to accomplish it.

bradfrost commented 6 years ago

To clarify, I'm suggesting adding something like keyboardShortcuts: false | true as a config option. If we wanted to get extra crazy, we could let users define their own shortcuts.

bmuenzenmeyer commented 6 years ago

@bradfrost

they are hard-coded and found within https://github.com/pattern-lab/styleguidekit-assets-default/blob/7942f01da25a9591a44f131971f3f3ad029dfca6/src/js/styleguide.js

search on jwerty.key

a config entry of any name can be used to conditionally bind all these calls

bmuenzenmeyer commented 6 years ago

labeling spec writeup needed because if a new config entry is added, both PL Node and PHP need to expose it to the client