Warning:
This wiki has been archived and is now read-only.

SC4-1-1-idrefs

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 that each element referred to from an idrefs attribute exists.

Background

Assumptions

no known assumptions

Test properties

Property Possible values
Success Criterion 4.1.1 Parsing
Test mode automatic
Test environment DOM
Test subject single web page

Test procedure

Selector

Test mode: earl:automatic


Select each td and th element with a headers attribute, and each element with an aria IDREFS attribute. The CSS selector "td[headers], th[headers], *[aria-controls], *[aria-describedby], *[aria-flowto], *[aria-labelledby], *[aria-owns]" can be used.

Step 1

Test mode: earl:automatic


  • Make a list of idRefVals by splitting the IDREFS attribute on whitespace characters
  • Trim each value in idRefVals by removing all whitespace characters
  • FOR EACH idRefVal in idRefVals
    • Get element IdTarget, by looking up the first element that has an ID attribute that matches idRefVal
    • IF idTarget exists:
      • Return SC4-1-1-idrefs-pass1
    • ELSE:
      • Return SC4-1-1-idrefs-fail1


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


Property Value
TestCase SC4-1-1-idrefs
Identifier SC4-1-1-idrefs-fail1
Outcome failed
ErrorMessage The attribute {IDREFS attribute} refers to an element with the id {idRefVal} which does not exist on the page.
Pointer selector result
Info