Sc3 1 1 Text

Created by: Annika Nietzio

Description

This test checks that the primary language of the content is specified correctly by the language attribute of the html element.

Background

Assumptions

This test does not prescribe which of these definitions to use as long as one of them is used.

Note that all language changes must be marked correctly independent of the chosen definition. This is covered by 3.1.2 Language of Parts.

Test properties

Property Value
Success Criterion 3.1.1 Language of Page
Test mode SemiAuto
Test environment DOM
Test subject Single web page

Test procedure

Selector

Test mode: automatic

L1 = value of lang attribute.

Step 1

Test mode: automatic

Select a continuous run of text from one or more consecutive p elements. If no p elements exist, select any text from the body of the web page. The text should be at least 300 characters in length and not contain any language changes, i.e. lang attributes on the element or its parent. If no such text is found, continue with Step 2.

Use a language identification algorithm to check if L1 is the language of the selected text.

If yes, return

Outcome Passed
Testcase SC3-1-1-text
ID SC3-1-1-text-text-pass1

Else continue with Step 2.

Step 2

Test mode: manual

Present the page to the user.

Question: Is L1 the primary language of this page?

Note that language code L1 should be presented in human readable form, e.g. using the description from the language subtag registry.

Help text: “Primary language” means the language of the majority of the text on the page or the language of the interface (navigation menu etc.) of the page.

If yes, return

Outcome Passed
Testcase SC3-1-1-text
ID SC3-1-1-text-pass2

Else return

Outcome Failed
Testcase SC3-1-1-text
ID SC3-1-1-text-fail1
Error The primary language of the page is not specified correctly.
Info L1