This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The accesskey global attribute provides a hint for generating a keyboard shortcut for the current element. The attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard).
<p>If you need to relax, press the <b>S</b>tress reliever!</p> <button accesskey="s">Stress reliever</button>
b {
text-decoration: underline;
}
The way to activate the accesskey depends on the browser and its platform:
| Windows | Linux | Mac | |
|---|---|---|---|
| Firefox | Alt + Shift + key | Control + Option + key or Control + Alt + key | |
| MS Edge | Alt + key | Control + Option + key or Control + Option + Shift + key | Control + Option + key |
| Google Chrome | |||
| Safari | n/a | Control + Option + key | |
| Opera | Alt + key | Control + Alt + key | |
There are numerous concerns with the accesskey attribute:
accesskey value can conflict with a system or browser keyboard shortcut, or assistive technology functionality. What may work for one combination of operating system, assistive technology, and browser may not work with other combinations.accesskey values may not be present on certain keyboards, especially when internationalization is a concern. So adapting to specific languages could cause further problems.accesskey values that rely on numbers may be confusing to individuals experiencing cognitive concerns, where the number doesn't have a logical association with the functionality it triggers.accesskeys are present, so that they are aware of the functionality. If the system lacks a method of notifying the user about this feature, the user might accidentally activate accesskeys.Because of these issues, it is generally advised not to use accesskeys for most general-purpose websites and web apps.
| Specification |
|---|
| HTML> # the-accesskey-attribute> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
accesskey |
1 | 12 | 1 | 15 | ≤4 | 18 | 4 | 14 | ≤3.2 | 1.0 | 4.4 | ≤3.2 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/accesskey