Assigns an access key to
A, AREA, BUTTON, INPUT, LABEL LEGEND and
Pressing an access key assigned to an element gives focus to the element.
If the element is not displayed in the current viewable portion of the screen, the window shifts so the user can view the element.
The action that occurs when an element receives focus depends on the element.
For example, when a user activates a link defined by the A element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc.
MS Windows, press and hold
[alt] then the access key( shifted characters like "
+" require the akward combination of
[ctrl] key in addition to the access key.
The following elements support the accesskey attribute:
This example assigns the access key "u" to a label associated with an INPUT control. Typing the access key gives focus to the label which in turn gives it to the associated control(i.e. the INPUT). The user may then enter text into the INPUT area.
<FORM action="..." method=post> <LABEL for=fuser accesskey=u> User Name </LABEL> <INPUT name=user id=fuser> </FORM>
<A accesskey=c rel=contents href=_html-notes.html> Table of Contents</A>
The rendering of access keys depends on the user agent. We recommend that authors include the access key in label text or wherever the access key is to apply. User agents should render the value of an access key in such a way as to emphasize its role and to distinguish it from other characters (e.g., by underlining it).