Add the possibility to toggle on/off keyboard shortcuts.
Provide a general summary of the feature here
When we have added keyboard shortcuts as seen here: https://storybook.sanomalearning.design/?path=/story/overlay-menu--shortcut we should have an option to let the user turn it off.
๐ค Expected Behavior?
If the user has selected to turn off keyboard shortcuts, we should not show them in the UI nor act on them.
๐ฏ Current Behavior
As I understand it, it cannot be turned off now.
๐ Possible Solution
A simple property "enableKeyboardShortcuts" should do it.
๐ฆ Context
If the user has selected to turn off keyboard shortcuts, we should have the possibility to turn them off in the component. A user would typically do this if it conflicts with other existing keyboard shortcuts.
There is even a somewhat related wcag criteria regarding this: https://www.w3.org/TR/WCAG22/#character-key-shortcuts
It's meant for single key shortcuts, but it's common for many accessibility tools to have a wide array of keyboard shortcuts. So we could easily conflict with such a tool.
As part of WCAG 2.2 and the new understanding of respecting user choice when it comes to EN 301 549, itslearning plans to have several options for users to change existing behaviour and defaults. (typography, colours, font-sizes etc)
๐ป Examples
No response
๐งข Your Product/Team
Itslearning
### Tasks
- [ ] find a way to update user preferences/config at runtime
- [ ] update menu to respect the enablekeyboard property
- [ ] Add property "enableKeyboardShortcuts"
- [ ] Update documentation