Language of Page - invalid language subtag

Test Case Summary

Test Case ID

TC15.1-3-fail-1

Test Case Description

Detect the existence of lang attribute on the <html> tag. Determine if the value of the lang attribute is correct for the language for the page. 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 the language for the page incorrectly identified as “eng”. It should be “en”. 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: 3

Test Case Detail

Expected Baseline Result

FAIL

The English page’s html tag has lang="eng" which is an invalid language subtag.

Test Data

Single-Page URL

Embedded Code

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] Pass: <html lang="eng">
15.1-3 Check that the value of the lang attribute matches the determined default human language for the page. [SC 3.1.1] Fail: “en” is the correct language subtag for this English page
Result If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. Fail: 15.1-3 fails