Web Site Accessibility Blog Raising the awareness of Web Site Accessibility and Marketing.

5Nov/066

Almost Getting it Right with Access Keys

Access keys are a method commonly used by web developers trying to make their sites more accessible. They allow the use of keyboard triggers to navigate your website. This navigation is most commonly achieved using the Alt key plus the designated trigger key.

Unfortunately, Access keys have a flawed implementation in almost every circumstance.

There are two major problems with the access key conundrum: discoverability and software conflicts. First, discoverability.

How do you know what access keys are available? Unless the designer has made special efforts to inform you, it's very difficult to know what keyboard shortcuts a site is using. Usually, designers attempt to either use logical and easily remembered choices, such as Alt + F for the FAQ and Alt + H for the home page, or externally recognized "standard" key assignments.

But that will still only enable a user to guess at the possibilities. There are a number of methods for developers to reveal their choices of accesskeys: but these are of little use to the user visiting a site which has not taken advantage of these methods.

The second problem is conflict with other keyboard shortcuts. By default, an assigned access key will override any other available keyboard shortcut. Thus, in the example provided above - Alt + F will visit the FAQ page - and not the "File" menu. There are so many possible key combinations in use by different user agents that it is practically impossible to select a keyboard shortcut which will not conflict with somebody's browser, screen reader, or other assistive technology. John Foliot prepared an extensive chart or keyboard shortcuts regularly in use, to give you a sense for what possibilities are available.

Firefox 2.0 has recently been released, and has attempted to rectify the problem by employing a multi-key invocation for access keys. Instead of the simple "Alt + key" combination, they've designated Shift + Alt + key as the required sequence.

Well, it's a good try.

Unfortunately, they've created two problems with this system. First, one of the user groups which benefits the most from access keys is those with motor skill disabilities. Adding an additional key to the sequence makes the process more complex, and requires greater dexterity: therefore increasing the barrier for that population. Second, they managed to disable numeric access keys. Really, it's just a mistake: the normal Shift key behavior has remained active, so it is impossible to type a number while pressing the Shift + Alt key combination. Instead, you type the alternate characters for the respective numeral.

Given that the UK recommended access key set (referenced above) predominantly consists of numbers, this bug renders the access keys of any site using the UK standards almost entirely irrelevant.

It's a disappointing attempt: clearly not fully thought out before being released. As much as I can't recommend access keys under any circumstances; they are used on many sites, and it should be the responsibility of the user agent to make certain that the method works according to the W3C guidelines.

Share and Enjoy:
  • StumbleUpon
  • del.icio.us
  • digg
  • NewsVine
  • Reddit
Comments (6) Trackbacks (1)
  1. I am currently overseeing the redevelopment of our site and the solution which our developers have come with is to allow the user define the access keys using javascript.

    Obviously, this won’t be of any good to non-js users, but that would be explained to them.

    What are your opinions in this regard?

  2. If access keys are used at all, allowing the user to define them is absolutely the best choice. That leaves the options open to the user: they know what shortcuts they’re likely to use with their own browser which they can then avoid assigning; they can standardize their choice of access keys in a manner which is intuitive to them.

    Assigning access keys via client-side scripting isn’t really ideal, however. I’d suggest using a server-side solution — I know of two freely available scripts for assigning access keys: one in ASP, and one in PHP. The PHP method has also been ported into ASP, so you can look at both versions of that one, as well.

    Hope that helps!

  3. Thankyou.

    In the end our developers used their own PHP code and finished this feature today and showed it to me about half an hour ago. I am quite impressed with the final result.

    They also showed me a javascript enhancement which removes the need for the additional keys such as ctrl, alt, shift etc. So, instead of alt+shift+H for home, you would simply press H.

    My opinion was, although it sounds great, it would be against the norm and may hinder accessibility unknowingly. Their response was that they could make it an option.

    What’s your thoughts on that? Would you say that, to make things simpler, we’re making things more complicated?

  4. I’m inclined to doubt the value of that kind of an “enhancement.” What it does is over-riding the normal behavior of the user-agent, which is never really recommended. Users of accesskeys most likely are very accustomed to the way in which they normally access them – and this enhancement just wouldn’t really help them.

    It should also be noted that the enhancement will cause major problems with any page which requires user input – any form with a text input. Obviously, if the user is typing an “h” in a form, they probably don’t want to be suddenly sent off to the home page.

    I can also imagine that it could cause problems for users trying to simply use their browser address bar to type in a new location or typing a search into their Google Toolbar – I’m not certain whether onpage scripting would impact this, but it should be tested, at the least.

  5. Thanks Joe. Their idea was that the enhancement would be de-activated when an input/textarea was involved, but i think we’ll leave this “enhancement” off.

    I must say, however, making sure a site is accessible to people with a wide array of disabilities is very difficult without having those disabilities yourself.

    Thanks again for your insight.

  6. I must say, however, making sure a site is accessible to people with a wide array of disabilities is very difficult without having those disabilities yourself.

    That’s definitely the biggest challenge – putting yourself into the position of all the possible users and trying to take their needs into consideration is a huge challenge. There are probably always elements which get left behind, but we just keep trying…

    Glad to have been able to help!


Leave a comment