id attributes have a unique value
This rule tests conformance of the following accessibility requirements:
This rule checks that
id attributes have a unique value.
- The value of the attribute is unique across all other
idattributes specified on elements that exist within the same document tree or shadow tree as the element on which the applicable
idattribute is specified.
This rule makes no assumptions.
This rule has no known accessibility support concerns.
These elements all have a different
ids and therefore pass the rule:
<div id="my-div1">This is my first element</div> <span id="my-div2">This is my second element</span> <svg id="my-div3">This is my third element</svg>
These elements have the same
id and therefore fail the rule:
<div id="my-div">This is my first element</div> <span id="my-div">This is my second element</span>
This element has no
id and is therefore inapplicable:
<div>This is my first element</div>
This document includes material copied from or derived from https://act-rules.github.io/rules/3ea0c8/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).