Rationale
Access keys are meant to provide keyboard users with shortcuts to make it possible to jump straight to an important link rather than have to tab through other links to get there. The idea is to provide an alternative to users who cannot use a mouse, or make navigation easier for people who find it difficult to read.
While great in theory, there are a number of problems with access keys that mean many site owners decide not to use them:
-
Potential conflict with access technologies, browsers and operating systems that also use keyboard shortcuts.
-
Some users find it confusing, having to learn a whole new navigation system on top of the regular site navigation - this is more likely when access keys are overused or used for uncommon shortcuts.
Overall we suggest that a well ordered site with good structural mark up, clear link text and page titles, making good use of hidden navigation can do more for the user in terms of easing navigation than access keys can. In addition to this, screen reader users, the main group for which hidden navigation is intended, already have a number of keyboard shortcuts that help navigation within pages. This includes functions to list links, headings, page titles, and frames and to skip between form fields.
Techniques
Only use numbers if access keys are to be used.
The ACCESSKEY attribute can be assigned to create shortcuts to bind "hot" keys that people can select to navigate your site and important features contained in its pages, such as forms, tables and links.
This attribute is most frequently used to give users quick access to important page links, such as those to the sitemap, accessibility and contact pages; but they can just as easily help users to quickly locate the search function or other feature in the site.
When assigning or binding keys for ACCESSKEY operation, it's important to use only numeric characters, as in some browsers, the access key function has to be combined with pressing the "Alt" key, which is the same way as keyboard navigation users would access the browser's toolbar. The danger is, that an alphabetic ACCESSKEY could conflict with, and override the toolbar command, preventing the use of important browser functions while on your site.
There is no universal convention governing which keys ought to be bound to which features, but a good guideline to follow can be found on the UK's Office of the E-envoy website, a link to which can be found in Further Information, below.
Example code to set the ACCESSKEY attribute-using HTML:
<a href="doc1.htm" accesskey="8">link 1</a>
<a href="doc2.htm" accesskey="9"> link 2</a>
Search <input name="search" accesskey="4">
Testing techniques
Verify that people who cannot use a mouse will be able to navigate easily and logically through your pages. Provide "Skip" links if the keyboard navigation is long or tiring.
-
Accessibility toolbar - Structure - AccessKeys (ensure that none will conflict with keyboard access to browser functions, ie all are numeric).
-
Browser - Perform physical checks by simply loading the page into a browser and using any access keys you've defined to browse through elements of the page. You want to be able to reach important features on the page with minimal effort.
Further information
Compliance with WCAG 1.0
-
9.5: Provide keyboard shortcuts to important links (including those in client-side image maps), form controls, and groups of form controls. Priority 3.