HTML DOM Element accessKey
Example
Set the access key of a link:
Return the accesskey of a link:
Description
The accessKey
property sets or returns the accesskey attribute of an element.
The accessKey
property specifies a shortcut key to activate or focus an element.
Warning
Using accesskeys is difficult because they may conflict with other key standards in the browser.
To avoid this problem, most browsers will use accesskeys only if pressed together with the Alt key.
Concerns
Adapting accesskeys to all international languages is difficult.
The accesskey value may not be present on all keyboards.
Because of these concerns, it is advised not to use accesskeys.
See Also:
Syntax
Return the accessKey property:
Set the accessKey property:
Property Value
Return Value
Browser Support
element.accessKey
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |