[thelist] Keyboard-driven Pages Tip

John.Brooking at sappi.com John.Brooking at sappi.com
Fri Jun 18 11:30:52 CDT 2004


Thanks to the responders to my query about keyboard-driven web pages. In
appreciation, here's a summary in the form of a tip:

<tip type="keyboard-driven web pages" author="John Brooking">

Did you know it is possible to include keyboard shortcuts to controls on
your web page, using only HTML? This allows users to go directly to some
control on the page with a keyboard character, usually in combination with
the Alt (Windows) or Command (Macintosh) keys. Not only is this faster for
people who prefer the keyboard, it makes navigation easier for users with
non-graphical browsers or motor disabilities.

To code keyboard shortcuts, you use the ACCESSKEY attribute, which is
defined by the W3C spec[1] for A, AREA, BUTTON, INPUT, LABEL, LEGEND, and
TEXTAREA elements. For some good examples, see [2]. Microsoft provides a
detailed recommendation for good keyboard interface design (not limited to
web pages)[3]. One of the most obvious recommendations is to provide some
indication to your users of what the keyboard shortcut is, such as
boldfacing, underlining, or otherwise styling the letter in the applicable
label.

However, there are some caveats. Browser support is spotty and inconsistent,
although since keyboard shortcuts are just an add-on to basic functionality,
basic functionality should not be affected. The other is that care must be
taken to not cover up an existing shortcut built into the browser, such as
Alt-F for the browser's File menu. This may not be as easy as you think,
since different browsers and different languages will vary in their built-in
shortcuts. So if they are used, they should be used sparingly, judiciously,
and with consistency.

References:
[1] http://www.w3.org/TR/html4/interact/forms.html#adef-accesskey
[2] http://www.cs.tut.fi/~jkorpela/forms/accesskey.html
[3]
http://msdn.microsoft.com/library/?url=/library/en-us/dnacc/html/ATG_Keyboar
dShortcuts.asp?frame=true

</tip>

John Brooking, Application Developer
600 Southborough Drive
-- 
 

This message may contain information which is private, privileged or
confidential and is intended solely for the use of the individual or entity
named in the message. If you are not the intended recipient of this message,
please notify the sender thereof and destroy / delete the message. Neither
the sender nor Sappi Limited (including its subsidiaries and associated
companies) shall incur any liability resulting directly or indirectly from
accessing any of the attached files which may contain a virus or the like. 


More information about the thelist mailing list