Web Access Centre

Access keys - Web Access Centre

Summary: Access keys are intended to provide keyboard users with keyboard shortcuts in order to make it possible to jump to key links rather than tab in a through links to get to it. The idea is to provide an alternative to users who can not use a mouse.


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

  • UK Government website Access Keys - A full list of ACCESSKEY attributes in the UK Government Standard can be found at section 2.4.4 of the e-Government Web Handbook.
  • User defined Access Keys: Juicy Studio - If you're in love with the idea of Access Keys, and are developing a new site, or have a database driven site, let users who want Access Keys decide which keys to bind, it's a better option than predefining them.

Website Accessibility Initiative compliance

  • Not required for WCAG 2.0 compliance, but is an Advisory technique for SC 2.1.1.
  • 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.

Other pages about navigation

Content author: henny.swan@rnib.org.uk

Last updated: 06/04/2009 16:20

More info

In your area

Quiz

UVA and UVB rays in sunlight do not contribute to eye diseases.




Your stories

JK Rowling's story - when JK Rowling had her website redesigned she asked design agency Lightmaker to push the boundaries of accessible Flash. The original site offered the user an intensely visual experience. The new site needed to keep the explorative and creative elements but present them in a universally accessible way. Find out about the key features of the site and how it was designed. JK Rowling's accessible Flash website - full story