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

This test belongs to 4.1.1 Parsing.


Version 1


This test checks that each element refered to from an idref attribute exists.



no known assumptions

Test properties

Property Possible values
Test name Reference 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 each label element with a for attribute and each element with a aria-activedescendant attribute. The CSS selector "label[for], *[aria-activedescendant]" can be used.

Step 1

Test mode: earl:automatic

  • Take the attribute with the IDREF (for=""/aria-activedescendant) value as IdrefAttr
  • Trim the IdrefAttr of whitespace characters
  • Select element IdTarget, by looking up the first element that has an ID attribute that matches the IdrefAttr
  • IF idTarget exists:
    • Return SC4-1-1-idref-pass1
  • ELSE:
    • Return SC4-1-1-idref-fail1

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

Property Value
TestCase SC4-1-1-idref
Identifier SC4-1-1-idref-fail1
Outcome failed
ErrorMessage The attribute {IdrefAttr} refers to an element that does not exist on the page.
Pointer selector result