accesskey
The accesskey global HTML attribute gives a hint for generating a keyboard shortcut for the current element. The attribute value must consist of a single printable character.
Overview
The accesskey global HTML attribute gives a hint for generating a keyboard shortcut for the current element. The attribute value must consist of a single printable character.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | ≤4 | 18 | ≤3.2 | |
| DOM API | ||||||
| The HTMLElement.accessKey property sets the keystroke which a user can press to jump to a given element. | 17 | 12 | 5 | 6 | 18 | 6 |
| The HTMLElement.accessKeyLabel read-only property returns a string containing the element's browser-assigned access key (if any); otherwise it returns an empty string. | | | 8 | 14 | | 14 |
Syntax
<button accesskey="s">Save (Alt+S)</button>
<a href="/help" accesskey="h">Help (Alt+H)</a> Live demo
ki-bo-dsho-tkat. settings
Accesskey attribute in element. ki-bo-dsho-tkat definition.
Use cases
Using accesskey
The accesskey global HTML attribute gives a hint for generating a keyboard shortcut for the current element. The attribute value must consist of a single printable character.
Cautions
- May not be supported in older browsers.
Accessibility
- Verify how this element is announced by screen readers.
Related links
Powered by web-features