0

It seems like many products have hotkeys for "simple" toolbar functions like bolding, etc. -- functions that apply to a selection but don't require further input.

For functions that require further input, such as setting a font style, it seems those require user to either use their mouse or transfer focus to the toolbar and navigate it that way.

Am I wrong about that? How does WCAG apply? I'm still absorbing WCAG but it seems that as long as you have some way to perform a function with a keyboard, it doesn't need to be in a hotkey.

  • On Windows, Alt typically jumps your focus to the menubar and allows you to navigate those menus by keyboard. On Mac, the same operation is triggered by the chord Ctrl-F2. Do you have some use case that isn't covered by those modes? – sintax Sep 23 at 17:48
2

As you mention WCAG I will presume you mean websites. (you should actually look at ATAG as that is likely to be more applicable.)

As long as you can reach every function by keyboard then your application / site is accessible by 'the rules'.

Job done right?

It may be enough to meet the legal requirements or minimums, but we should change our thinking to exceed minimums and that is where adding hotkey shortcuts is a great idea.

However there is a big problem, a lot of keys are reserved for screen reader functionality and if you interfere with those then you will make things worse in terms of accessibility.

Further to that, users can change their hotkeys for their screen reader so in theory no keys are 'safe'.

The only way to implement hotkeys effectively and give users the benefits that hotkeys bring are as follows:-

  1. Hotkeys should be off by default.
  2. Provide a button, right at the beginning of a set of controls / beginning of the page / somewhere appropriate that allows hotkeys to be switched on and off.
  3. When hotkeys are switched on make it very clear what the current hotkeys are (via modal at first time activating maybe?) and also to let people know how they can change your default bindings to their preferences.
  4. implement a hotkeys settings screen where hotkeys can be changed to a users preferences.
  5. on each hotkey make sure there is some visually hidden (or even better visible if you can design a layout that works) indication of what hotkey is bound to that item (i.e. <button>BOLD <span class="visually-hidden">Hotkey: B</span></button>).
  6. Also provide users with a simple hotkey to turn hotkey shortcuts on and off (is that hotkey inception? HeHe) - that they can also change the binding key if they desire.

All of the above is complex which is why people don't generally do shortcut keys anymore but if you can put the effort in your application will be much more friendly to screen reader users.

As an added bonus, allowing everyone else to set their own shortcuts means they can configure your site the way they would prefer to use it, I for one would be grateful of any site who lets me change key bindings for shortcuts.

  • If it is a role="application" subsection of your website, do you still need to respect the screenreader bindings? – z0d14c Oct 30 at 9:06
  • Interesting question, my thoughts would be yes but I actually haven't thought about it because I default to the above recommended method. Had a quick look through ATAG and can't see an answer. My rule is if unsure default to best practices and allow key bindings to be changed. – Graham Ritchie Oct 31 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.