accesskey attribute value should be unique
Accessibility isn’t only about avoiding violations — it’s about ensuring your product can be used confidently by everyone. This guide explains the principle of this rule, shows what goes wrong in real-world code, and provides a verified fix that meets WCAG and the European Accessibility Act (EAA).
Why this matters and how to fix it
Why this matters
When multiple elements share the same access key, or when access keys conflict with browser or assistive technology shortcuts, users can lose control of navigation. Some users accidentally trigger shortcuts they cannot undo, disrupting their workflow.
How to fix this issue
Use the `accesskey` attribute only when absolutely necessary. Ensure each access key is unique within the page and does not conflict with common screen reader or browser shortcuts. Provide documentation or visible hints if you implement them.
Developer guidance
Most accessibility experts recommend avoiding access keys altogether. If your design requires them, manage and validate assignments globally to avoid overlap. Test with popular screen readers and browsers to confirm they do not override built-in commands.
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>
Trusted by organizations across Europe working toward WCAG and EAA conformance