SC4-1-1-id

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

This test belongs to 4.1.1 Parsing.

Status

Version 1

Description

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

Background

Assumptions

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

Selector

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
Info


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
Info