Specifying Access Keys
Access keys are specified in HTML using the accesskey attribute. The value of an element’s accesskey attribute is the key the user will press (typically in combination with one or more other keys, as defined by the browser) in order to activate or focus that element. Though the accesskey attribute sets the key that can be pressed it does not automatically notify the user of the bound access key. One convention is for the page author to show the access key value by using the tag to underline the a letter in the link’s text corresponding to the accesskey assigned. For the link below a user would press Alt+H on Internet Explorer, Ctrl+H on a Mac (the command key can give undesired results) and ⇧ Shift+Esc+H on Opera to be directed to index.html.
Homeor to emphasize ‹H›:
Homealternatively, the following CSS can be used to indicate the character:
*:after {content:' '}Emphasize isn’t necessary, but can be useful to the user. It helps them identify which key to press to navigate to where they want to. Another possible way of displaying which accesskeys do what is to create a page with all the accesskeys displayed. Or the webmaster could do both. Another option for the end user is to install a user script such as FireFox Access Bar for GreaseMonkey.
Read more about this topic: Access Key
Famous quotes containing the words access and/or keys:
“The Hacker Ethic: Access to computersand anything which might teach you something about the way the world worksshould be unlimited and total.
Always yield to the Hands-On Imperative!
All information should be free.
Mistrust authoritypromote decentralization.
Hackers should be judged by their hacking, not bogus criteria such as degrees, age, race, or position.
You can create art and beauty on a computer.
Computers can change your life for the better.”
—Steven Levy, U.S. writer. Hackers, ch. 2, The Hacker Ethic, pp. 27-33, Anchor Press, Doubleday (1984)
“without luggage or defenses,
giving up my car keys and my cash,
keeping only a pack of Salem cigarettes
the way a child holds on to a toy.
I signed myself in where a stranger
puts the inked-in Xs”
—Anne Sexton (19281974)