Sc3 1 2 Text

Created by: Annika Nietzio

Description

This test checks that changes in human language are marked up correctly in the web content.

Background

Assumptions

Test properties

Property Value
Success Criterion 3.1.2 Language of Parts
Test mode SemiAuto
Test environment DOM
Test subject Single web page

Test procedure

Selector

Test mode: automatic

Select consecutive run of text to which a single language attribute applies.

L1 = language of the selected text as determined by HTML 4.01 Inheritance of language codes.

Note: This test is applied to natural language text. The test is not applicable to content of script elements, attribute values, and text contained in HTML comments.

Step 1

Test mode: automatic

Use a [language identification algorithm][LANGFND] to determine L2 = the language actually used in the selected text.

If L2 can not be determined by the algorithm.

Continue with Step 2.

If L2 is equal to L1, return

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

Else return

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

Step 2

Test mode: manual

Present the selected text to the user.

Question: Is L1 the only language used in this text?

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

Help text: If the text contains a phrase or sentence in another language, please answer “no”. If there are only single words in another language and the rest of the text is in L1, please answer “yes”.

If yes, return

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

Else return

Outcome Failed
Testcase SC3-1-2-text
ID SC3-1-2-text-fail2
Error The language of the text is not specified correctly.
Info L1, L2