From Automated WCAG Monitoring Community Group
Jump to: navigation, search

This test belongs to 4.1.1 Parsing.


Version 1


This test checks id attribute for all elements to have a unique value.



no known assumptions

Test properties

Property Possible values
Test name Define ids for elements
Test requirement 4.1.1 Parsing
Test mode Automatic
Test environment DOM
Test subject single web page

Test procedure


Test mode: earl:automatic

Select any element with an id attribute. The following CSS selector could be used: *[id]

Step 1

Test mode: earl:automatic

  • IF there is no list called 'knownIDs':
    • Create an empty list 'knownIDs;
  • IF the value of the ID attribute exists in 'knownIDs':
    • Return SC4-1-1-id-fail1
  • ELSE:
    • Add the value of the ID attribute of the selected element to 'knownIDs'
    • Return SC4-1-1-id-pass1

Property Value
TestCase SC4-1-1-id
Identifier SC4-1-1-id-pass1
Outcome passed
Pointer selector result

Property Value
TestCase SC4-1-1-id
Identifier SC4-1-1-id-fail1
Outcome failed
ErrorMessage The ID of this element has occurred before on this page
Pointer selector result