Test Case Summary
Test Case ID
TC15.1-2-fail-2
Test Case Description
Detect the existence of lang
attribute for the <html>
tag.
The code sample provides a page in English with no lang
attribute on the <html>
tag. Instead, the lang
attribute is on the <head>
tag. A successful test should identify a FAIL for Baseline 15.1-LanguagePage.
Applicable ICT Baseline Test
15.1 Test Procedure for Language of Page
Baseline Test ID: 15.1-LanguagePage
Test Instruction: 2
Test Case Detail
Expected Baseline Result
FAIL
The English page’s <html>
tag has no lang
attribute. The lang
attribute is on the a <head>
tag, which is incorrect.
Test Data
Single-Page URL
Embedded Code
Test Case Instruction
Test Instruction | Instruction Detail | Expected Test Case Result |
---|---|---|
IC-1 | Pages with text (including text alternatives). | Applicable; page has text. |
15.1-1 | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
15.1-2 | Check that the lang attribute is defined on the <html> tag for the page. [SC 3.1.1] |
Fail: <html> has no lang attribute |
Result | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-2 fails |