1

I'm trying to make my navigation as accessible as it gets and I'm considering to add some accesskey-shortcuts for it, but have some doubts.

1) There's possibility the accesskeys may come into conflict with some of the key-binds on the user-area accessibility software. Is this critical? Perhaps some JS for turning off\on the accesskeys will be a good idea?

2) As I got it there should be some special numbers(accesskeys) for accessibility.

1 for home;
2 for skipping navigation;
4 for search input;
9 for contact
0 for accessibility statement;

If it is so, is there some more? Like for "help" or something else?

3) At w3.org it says I should place the accesskeys in numbered list(ol). How critical is it?

4) Is it a bad practice to use JS for binding hot-keys for a web-page from accessibility point of view?

Michael
  • 1,089
  • 1
  • 11
  • 28
jiostoph
  • 35
  • 4

2 Answers2

1

Your first point, about your access keys conflicting with the shortcuts that come with assistive software and devices, is a real problem. Unless you're prepared to do cross-browser testing on all the possible device and software combinations (I've seen a mini-Braille-keyboard plugged in to an iPhone 6, for example), you can't guarantee your shortcuts aren't cutting people off from a shortcut they use on every other site they visit.

An alternative to access keys is to create a really nice skip menu. Not just skip-to-content, but also skip to search, or contact, etc. I've only seen a few of these online, and in my opinion the one at Simply Accessible is the best looking. (Disclaimer: I contract with them, but did not build the site). It uses JavaScript to gather the headings and turn them into a small menu of what's on the page. It uses standard links, which assistive techs already manage really well. You could do the same with the sections you were going to make access keys for. Or if they're the same sections on every page you might not need JS for it and could just use a HTML/CSS template.

stringy
  • 1,323
  • 7
  • 16
1

I'm not sure there would be interference if you're talking about specifying accesskey='f', for example. When I run JAWS or NVDA, they both tell me "alt plus f" when my focus goes to the element that has that accesskey. (Firefox will say "alt plus shift plus f"). I use accesskeys all the time, as a user. For example, in wikipedia, the search field has an accesskey of F so I'm constantly using shift+alt+f to get to the search field in firefox.

That won't interfere with the quicknav keys, at least in these two particular screen readers. I can still navigate to headers using H, buttons using B, tables using T, etc. None of my screen reader shortcut keys are Alt+anything.

The W3C link you have is from 2005. Not that it's not still valid, and they appear to use it here - https://validator.w3.org/accesskeys.html, but I'm not sure I've ever seen a site with an ordered list of accesskeys.

For screen reader users, it's more important to have all the semantic information correct on your page. Make sure headers are real headers (either <h1> or <div role='header' aria-level='1'>), buttons are real buttons (<button> or <div role='button'>), etc.

By doing so, it allows the screen reader user to use the quicknav keys as mentioned earlier (H, B, T, etc). I use these quicknav keys way more than I use accesskeys, but that might be my personal preference.

slugolicious
  • 15,824
  • 2
  • 29
  • 43