accesskey Attribute


 

Where to use the accesskey Attribute


Description

The accesskey attribute specifies a key which may be used as a shortcut to access a particular element (to bring an interactive form control into focus, to follow a hyperlink, to activate a button, etc.).

Each user agent has a different method for activating accesskeys, some of which are shown in the table below:

How to activate accesskeys in some common browsers.
BrowserKey Sequence
Firefox 3, Firefox 2 (Linux, Windows)ALT + SHIFT + accesskey
Firefox <= 1.5 (Linux, Windows)ALT + accesskey
Firefox (Mac)CTRL + accesskey
OperaSHIFT + ESC + accesskey
Internet Explorer 5+ (Windows)ALT + accesskey + ENTER
Internet Explorer 5+ (Mac)CTRL + accesskey

Unfortunately, the accesskey approach to keyboard accessibility is flawed. This is because many of the key combinations which are needed to activate particular accesskeys are often reserved for other uses within a variety of user agents. Some browsers have developed accesskey implementations which do not have this flaw (e.g. Opera, Firefox >= 2), but sprinkling accesskeys liberally around a site is very likely to break other keyboard functionality within some users' browsers.

This site defines only one accesskey X which is used as a shortcut to the very top of the page, where other accessibility links are situated. See the site's Accessibility page for more information. X was chosen as the key least likely to interfere with the widest range of user agents.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > accesskey Attribute (XHTML 1.1)