Reputation: 6126
Our CMS manufacturer delivers HTML templates that look like this:
<li><a accesskey="A" href="#">Accordion</a></li>
<li><a accesskey="A" href="#">Audio/Video</a></li>
<li><a accesskey="C" href="#">Charts</a></li>
<li><a accesskey="C" href="#">Container</a></li>
<li><a accesskey="F" href="#">Forms</a></li>
In my opinion, the attributes have to be unique. Is this correct?
Upvotes: 2
Views: 531
Reputation: 943999
HTML provides no guidance on the subject.
A WCAG note says offers this as a failure state for one of its tests:
An accesskey attribute value that is not unique
In practical terms, some browsers will allow the elements to be cycled through, while others will take only one value as acceptable.
TLDR: There's no requirement that they be unique, but duplicates will cause issues.
Upvotes: 1
Reputation: 8736
It is not required. The behaviour if more than one element has the same accesskey different in different browsers:
accesskey
will be
activated accesskey
will be activated accesskey
will be activatedUpvotes: 3