demosthenes.info

A blog by Dudley Storey on , , , , , , and anything else that strikes his fancy.

featured articles

popular favourites

Firefox Accesskey Bug Fix

Firefox has a known issue with using the numeral 1 as an access key shortcut, a bug that has been present through several versions of the browser. Essentially Firefox sees the 1 key as being shifted when it is used. As access key 1 is usually reserved for the home / index page, the solution is to create an alternate access key link to the home page with the exclamation point (i.e. a shifted 1) as the shortcut. This is easy, as the home page is usually linked to at least twice on every page: once in the navigation bar, and once in the <h1> element. An example would be:

  1. <h1><a href="index.html" accesskey="!">Brobdingnagian Corporation</a></h1>
  2. <ul id=”nav”>
  3. <li><a href=”index.html” accesskey=”1”>Home</a></li>
  4. <li><a href=”about.html” accesskey=”2”>About</a></li>
  5. <li><a href=”map.html” accesskey=”3”>Site Map</a></li>
  6. <li><a href=”search.html” accesskey=”4”>Search</a></li>
  7. <li><a href=”help.html” accesskey=”0”>Help</a></li>
  8. </ul>

Firefox will interpret any use of the 1 key as an exclamation point, and use the access key attribute in the link around the h1 content; all other browsers will use the normal 1 shortcut provided by the link in the unordered list.

web developer guide

featured comment

by JoelB in Goodbye, JQuery Validation: HTML5 Form Errors With CSS3

what i'm reading

A Storm of Swords: A Song of Ice and Fire: Book Three
A Storm of Swords: A Song of Ice and Fire: Book Three

what i'm watching

Californication: The Third Season
Californication: The Third Season

what i'm playing

Mass Effect 3 Collector's Edition
Mass Effect 3 Collector's Edition

what i'm hearing

Dub FX
Dub FX

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.