| id | e6952f | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | Attribute is not duplicated | ||||||||||||||||||||
| rules_format | 1.1 | ||||||||||||||||||||
| rule_type | atomic | ||||||||||||||||||||
| description | This rule checks that HTML and SVG starting tags do not contain duplicated attributes. | ||||||||||||||||||||
| accessibility_requirements |
|
||||||||||||||||||||
| input_aspects |
|
||||||||||||||||||||
| acknowledgments |
|
||||||||||||||||||||
| htmlHintIgnore |
|
||||||||||||||||||||
| deprecated | This rule has been deprecated because success criterion 4.1.1 has been removed in WCAG 2.2 and for WCAG 2.1 and 2.0 should be considered to always pass. |
This rule applies to any starting tag in an HTML or SVG document.
Note: This rule cannot be tested on the DOM Tree because the browser removes duplicates of any attribute that is already present on an element.
For each test target, there are no duplicated attributes.
There are no assumptions.
There are no accessibility support issues known.
This img element contains no duplicated attributes.
<img src="/test-assets/shared/w3c-logo.png" alt="W3C logo" />This br element contains no attributes, so there is no duplicated attribute.
<br />This input element contains three different attributes, two of them being empty.
<input type="checkbox" disabled readonly />This SVG element contains no attributes.
<svg>
<line x1="0" y1="0" x2="200" y2="200" style="stroke-width:2" />
</svg>This script element contains duplicated attributes, but they are ignored because they are placed within the script tag.
<script>
var foo = '<img src="/test-assets/shared/w3c-logo.png" alt="" alt="W3C logo" />'
</script>This img element contains a duplicated alt attribute.
<img src="/test-assets/shared/w3c-logo.png" alt="" alt="W3C logo" />This input element contains a duplicate disabled attribute.
<input type="checkbox" disabled="disabled" disabled readonly />This line element contains duplicate x1 and duplicate y1 attributes.
<svg>
<line x1="0" y1="0" x1="200" y1="200" style="stroke-width:2" />
</svg>This code is XML, not HTML or SVG.
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:earl="http://www.w3.org/ns/earl#">
<earl:TestResult rdf:about="#result"></earl:TestResult>
</rdf:RDF>This code is JavaScript, not HTML or SVG.
var foo = '<img src="/test-assets/shared/w3c-logo.png" alt="W3C logo" />'