The accesskeyglobal attribute hints a keyboard shortcut for the current element. Its value is usually a single printable character (including accented characters the keyboard can produce). The browser combines that character with platform modifiers (such as Alt or Control + Option).
You can put it on almost any HTML element — buttons, links, inputs, and more. Prefer predictable focus tools like tabindex and clear labels for everyday sites.
Baseline · Widely available.
Not deprecated and not experimental. Supported across modern browsers since about July 2015. Modifier keys still differ by browser and OS.
Accessibility caution.
Shortcuts often conflict with the browser, OS, or assistive technology. MDN generally advises not to use accesskey on most general-purpose websites and apps.
Syntax
HTML Syntax
syntax.html
<element accesskey="character">
The HTML living standard also allows a space-separated list of alternatives; the user agent may pick one that works on the device.
Values
Attribute Values
What you can put in accesskey:
Value
Description
Try it
One character
A single printable key, e.g. s, 1, or an accented letter
Browser may prefer S on a full keyboard or 0 on a keypad.
How It Works
Space-separated list.s 0 offers two candidates.
UA chooses. A full keyboard might use S; a numeric pad might use 0.
Focuses the control when the assigned shortcut runs.
Still optional. Many sites skip accesskey and rely on Tab order instead.
Edge Cases & Pitfalls
Most problems are conflicts and discovery — not syntax.
a11y
Conflicts with OS and AT
A key that works in one browser/OS pair can break assistive technology or clash with browser chrome elsewhere.
i18n
Not every keyboard has your character
International layouts may lack the letter you chose. Prefer letters that exist for your audience — or avoid accesskey.
discovery
Users may not know shortcuts exist
Underline or document the key. Silent shortcuts cause accidental activation.
numbers
Numeric keys can confuse
Numbers without a clear meaning are harder for some users. Prefer letters tied to the control’s name when you must use accesskey.
prefer Tab
Tab order is usually enough
For most sites, logical focus order and tabindex (when needed) are safer than custom shortcuts.
Compatibility
Browser Support
accesskey is an HTML global attribute in the browser. It is not a Node.js, Deno, or Bun API. Modifier keys differ by engine and OS.
✓ Baseline · Widely available
accesskey
Widely available since about July 2015. Support for the attribute is broad; the exact key combination is browser- and platform-specific.
97%Attribute support
Google ChromeAll modern · Alt+key (Win)
Full support
Mozilla FirefoxAll modern · Alt+Shift+key (Win)
Full support
Apple SafariControl+Option+key (Mac)
Full support
Microsoft EdgeAll modern · Alt+key (Win)
Full support
OperaAll modern
Full support
Samsung InternetAll modern
Full support
Internet ExplorerSupported (legacy)
Supported
accesskeyWidely supported
Bottom line: The attribute works widely. Treat activation shortcuts as inconsistent, and prefer not to rely on accesskey for critical UX.
Remember
Key Takeaways
Role: hint a keyboard shortcut for focus or activation.
Value: usually one printable character; lists are allowed by the living standard.
Modifiers differ by browser and OS — always test.
Use sparingly: MDN warns against accesskey for most general sites.
One line:accesskey hints a shortcut — learn it, test it, but rarely ship it by default.
Frequently Asked Questions
It is a global attribute that hints a keyboard shortcut for focusing or activating an element. The value is typically a single printable character.
It depends on the browser and OS. Common patterns include Alt + key (Windows Chrome/Edge), Alt + Shift + key (Firefox on Windows), and Control + Option + key (macOS).
Usually no. MDN advises against it for most general-purpose sites because shortcuts often conflict with the browser, OS, or assistive technology.
Authors usually set one character. The HTML living standard also allows a space-separated list of alternatives so the browser can pick a working key.