accesskey attribute value must be unique

Rule Description

All accesskeys in the document must be unique. Put another way, accesskeys must not be repeated to prevent unexpected effects for keyboard users.

The Algorithm, in Simple Terms

Ensures that each element on the page with an accesskey attribute has a unique value.

Why this is Important

Specifying an accesskey for some part of a document allows the user to quickly activate or focus an element by pressing the specified key (usually in combination with the alt key). If the same accesskey is used more than once, this could create unexpected effects that ultimately make the page less accessible.

For each accesskey defined, ensure it is unique and does not conflict with existing browser and screen reader shortcut keys.

When content cannot be operated through a keyboard or alternate keyboard, it is not operable by people with no or low vision (who cannot use devices such as mice that require eye-hand coordination or who have trouble tracking a pointer) nor by people who must use alternate keyboards or input devices that act as keyboard emulators.

Compliance Data & Impact

User Impact: Serious
Disabilities Affected:
  • Blindness
  • Low Vision
  • Mobility/Dexterity
Severity: Serious
Issue Type:
  • Deque Best Practice
WCAG Success Criteria:
  • Not applicable
Section 508 Guidelines:
  • Not applicable

How to Fix the Problem

Ensure all accesskey values in the document are unique.

Find repeated accesskey values and change some to avoid repetition.

For example, if you have the following code:


       <a href="google.com" accesskey="g">Link to Google</a>

<a href="github.com" accesskey="g">Link to GitHub</a>

You should change the value of one of the accesskeys.An improved version of the above code looks like this:


   <a href="google.com" accesskey="g">Link to Google</a>

<a href="github.com" accesskey="h">Link to GitHub</a>

Although the “providing access keys” option exists, we do not recommend it because of the following limitations:

  • Not all browsers support access keys
  • Access keys are not always obvious to the user
  • Access keys defined by the developer may conflict with browser access keys
  • The use of a letter from a label element as the access key can cause problems when rendering in multiple languages

Additional Information

Relevant Technologies:
  • HTML 4
  • HTML5
Test Reliability: Automated testing is possible, with high accuracy
Rule ID: accesskeys