Friday, June 28, 2002
Day 15: Defining keyboard shortcuts
Mark PilgrimOne of the least known features of HTML is the
accesskeyattribute for links and forms, which allows the web designer to define keyboard shortcuts for frequently-used links or form fields. On Windows, you can press ALT + an access key; on Macintosh, you can press Control + an access key.[For Radio users,] simply add an
accesskeyattribute to the link, like this:<a href="<%radio.macros.weblogUrl ()%>" accesskey="1"><%siteName%></a>
Hmm, "least known" is for sure - I've never even heard of doing this. Makes sense though. I try to minimize my use of the mouse in most applications, but it's almost unavoidable when browsing. Yeah, I can tab through the links, but who wants to do that?
OK, I added an accesskey attribute to the link to my home page.