{{HTMLSidebar("Global_attributes")}}
The accesskey global attribute provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters (one single Unicode code point). The browser uses the first one that exists on the computer keyboard layout.
The operation to activate the accesskey depends on browser and its platform.
Windows | Linux | Mac | |
---|---|---|---|
Firefox | AltShift key | On Firefox 14 or newer, ControlAlt
key
On Firefox 13 or older, Control key |
|
Internet Explorer | Alt key | N/A | |
Google Chrome | Alt key | ControlAlt key | |
Safari | Alt key | N/A | ControlAlt key |
Opera | ShiftEsc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key |
Note that Firefox can customize the required modifier key by user's preferences.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "interaction.html#the-accesskey-attribute", "accesskey")}} | {{Spec2('HTML WHATWG')}} | No change from latest snapshot, {{SpecName('HTML5.1')}} |
{{SpecName('HTML5.1', "editing.html#the-accesskey-attribute", "accesskey")}} | {{Spec2('HTML5.1')}} | Snapshot of {{SpecName('HTML WHATWG')}}, no change from {{SpecName('HTML5 W3C')}} |
{{SpecName('HTML5 W3C', "editing.html#the-accesskey-attribute", "accesskey")}} | {{Spec2('HTML5 W3C')}} | Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName('HTML4.01')}}, several characters can be set as the accesskey . Also, it can be set on any element, not only {{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("label") }}, {{ HTMLElement("legend") }} and {{ HTMLElement("textarea") }}. |
{{SpecName('HTML4.01', "interact/forms.html#h-17.11.2", "accesskey")}} | {{Spec2('HTML4.01')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
See also
- All global attributes.