Use identical xml:lang and lang attributes [SC3-1-1-xml-lang]
Test infoPossible Results
Test info
Test for Success Criterion 3.1.1
About
Checked Elements: html
This test checks the value of the xml:lang attribute.
Short Description
If <html> element contains an xml:lang attribute exists on a page, it should contain also a lang attribute with the same value.
How to Repair
Use the
If you use
Examples of valid language tags are
- nb – for Norwegian Bokmal
- nn – for Norwegian Nynorsk
- en – for English
- en-US – for English as used in the USA
WCAG 2.0
- Principle 3: Understandable
-
Information and the operation of user interface must be understandable.
WCAG 2.0: Principle 3 - Guideline 3.1: Readable
- Make text content readable and understandable. Understanding Guideline 3.1
- Success Criterion 3.1.1: Language of Page (Level A)
- The default human language of each Web page can be programmatically determined . Understanding: Success Criterion 3.1.1
- Technique
Possible Results
- Contradicting language codes.
-
Contradicting language codes.
- No lang attribute found. Only xml:lang.
-
No lang attribute found. Only xml:lang.
- Same lang attributes available to xml:lang
-
The value of the xml:lang attribute is equal to lang attribute of html element