Sc3 1 2 Xml Lang

Created by: Annika Nietzio

Description

This test checks the value of the xml:lang attributes.

Background

Assumptions

Test properties

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

Test procedure

Selector

Test mode: automatic

Select the element with xml:lang attribute.

descendent-or-self::body[@xml:lang]

Step 1

Test mode: automatic

Check that the selected element contains also a lang attribute.

If no lang is specified, return

Outcome Failed
Testcase SC312-xml-lang
ID SC312-xml-lang-fail1
Error No lang attribute found.

Step 2

Test mode: automatic

L1 = value of xml:lang

L2 = value of lang

Compare L1 and L2.

If the L1 and L2 differ, return

Outcome Failed
Testcase SC312-xml-lang
ID SC312-xml-lang-fail2
Error Contradicting language attributes.
Info L1, L2

Else, return

Outcome Passed
Testcase SC312-xml-lang
ID SC312-xml-lang-pass1