accesskey attribute value should be unique

Content available in English only.

Accessibility isn’t just about avoiding violations — it’s about ensuring that everyone can use your product with confidence. This guide explains each rule’s intent, highlights common issues, and shows how to fix them according to WCAG and the European Accessibility Act (EAA).

These guidelines do not replace the official WCAG standards. They’re concise, developer-focused notes to help you identify and fix issues effectively.

Every accesskey must be unique and conflict-free.

Why this matters and how to fix it

Why this matters

If two or more elements share the same access key, or if access keys conflict with system, browser, or assistive technology shortcuts, users may trigger unintended actions or lose control of navigation. Screen reader users are particularly vulnerable to accidental activations.

How to fix this issue

Avoid using `accesskey` unless there is a specific user need. If used, ensure each access key is unique across the page and does not conflict with known browser, OS, or assistive technology shortcuts. Document the access key strategy for consistency.

Automated detection · Manual review recommended

Developer guidance

Behavior of `accesskey` varies across browsers and assistive technologies. If you use access keys, test them across multiple platforms (Windows, macOS, Linux, iOS, Android) and assistive technologies (NVDA, JAWS, VoiceOver) to confirm no conflicts or unexpected activation patterns. Consider providing a visible legend for users showing available shortcuts.


Code examples

Incorrect Implementation

<button accesskey="S">Save</button>
<a href="/settings" accesskey="S">Settings</a>

Correct Implementation

<button accesskey="S">Save</button>
<a href="/settings" accesskey="T">Settings</a>

Real-World Examples

Before

<nav>
  <a href="/home" accesskey="H">Home</a>
  <a href="/help" accesskey="H">Help</a>
</nav> <!-- Pressing 'H' triggers the first link only, confusing users -->

After

<nav>
  <a href="/home" accesskey="H">Home</a>
  <a href="/help" accesskey="E">Help</a>
</nav> <!-- Each access key is unique and predictable -->

Manual testing

  1. 1. List all elements with an `accesskey` attribute on the page.
  2. 2. Verify that each access key is unique and does not conflict with OS or browser shortcuts.
  3. 3. Test keyboard activation of each access key on multiple browsers and assistive technologies.
  4. 4. Ensure activation triggers the intended element only and does not cause unexpected behavior.
  5. 5. Document the access keys in your UI for user reference.
eu icon getwcag

Trusted by organizations across Europe working toward WCAG and EAA conformance