Warning:
This wiki has been archived and is now read-only.
SC3-1-2-xml-lang
From Automated WCAG Monitoring Community Group
This test belongs to 3.1.2 Language of Parts.
Status
Previous versions
Contents
Description
This test checks the value of the xml:lang
attributes.
Background
- H58: Using language attributes to identify changes in the human language
- eGovMon test for SC3.1.2
- BCP 47: Tags for the Identification of Languages
Assumptions
- Tests have shown that
xml:lang
is ignored by screenreaders. (Both Jaws 15 with FF and IE and NVDA with FF go by lang attribute, xml:lang is ignored.) This test identifies pages that use only thexml:lang
attribute.
Test properties
Property | Possible values |
---|---|
Test name | Language of Parts |
Success Criterion | 3.1.2 Language of Parts |
Test mode | automatic |
Test environment | DOM |
Test subject | single web page |
User expertise and skills | |
User profile |
Test procedure
Selector
Test mode:
earl:automatic
Select the element with xml:lang
attribute.
descendent-or-self::body[@xml:lang]
Step 1
Test mode:
earl:automatic
Check that the selected element contains also a lang
attribute.
If no lang
is specified,
return
Property | Value |
---|---|
TestCase | SC312-xml-lang |
Identifier | SC312-xml-lang-fail1 |
Outcome | failed |
ErrorMessage | No lang attribute found. |
Pointer | position |
Info |
Step 2
Test mode:
earl:automatic
L1 = value of xml:lang
L2 = value of lang
Compare L1 and L2.
If the L1 and L2 differ, return
Property | Value |
---|---|
TestCase | SC312-xml-lang |
Identifier | SC312-xml-lang-fail2 |
Outcome | failed |
ErrorMessage | Contradicting language attributes. |
Pointer | position |
Info | L1, L2 |
Else, return
Property | Value |
---|---|
TestCase | SC312-xml-lang |
Identifier | SC312-xml-lang-pass1 |
Outcome | passed |
Pointer | position |
Info |