Test Case Summary
Test Case ID
TC15.2-3-fail-2
Test Case Description
Detect the existence of lang
attribute for text (part) that differs from the default human language of the page. Determine if the value of the lang
attribute is correct for the language of the part. The value must also be identified in the Internet Assigned Numbers Authority’s IANA Language subtag registry.
The code sample provides a page in English with a part in French, with the language pf the part incorrectly identified as Spanish. A successful test should identify a FAIL for Baseline 15.2-LanguagePart.
Applicable ICT Baseline Test
15.2 Test Procedure for Language of Parts
Baseline Test ID: 15.2-LanguagePart
Test Instruction: 3
Test Case Detail
Expected Baseline Result
FAIL
The French part has incorrect lang="es"
attribute.
Test Data
Single-Page URL
Embedded Code
Test Case Instruction
Test Instruction | Instruction Detail | Expected Test Case Result |
---|---|---|
IC-1 | Text content that differs from the default human language of the page including alternative text for non-text content. | Applicable: the English page has a part in French |
15.2-1 | Identify the human language of the text content that differs from the default human language of the page. | French |
15.1-2 | Check that the lang attribute is specified for any HTML element that contains a content segment that differs from the default human language of the page. [SC 3.1.2] |
Pass: <blockquote lang="es"> |
15.1-3 | Check that the value of the lang attribute is correctly defined for the content segment. [SC 3.1.2] |
Fail: “es” is not the correct language subtag for French |
Result | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-3 fails. |