/
04_indicating_language.feature
46 lines (40 loc) · 1.17 KB
/
04_indicating_language.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Feature: Specify content language
The main language of the page **must** be specified.
Changes to language within the page **must** be indicated.
Rationale
=========
Assistive technologies such as screen readers have support for different
languages, allowing for appropriate pronunciation.
Scenario: lang attribute on html element
Given a page with the HTML:
"""
<!DOCTYPE html>
<html lang="en-GB">
<head>
<title>Language specified</title>
</head>
<body>
<h1>The language is specified</h1>
</body>
</html>
"""
When I test the "Indicating language: Html must have lang attribute" standard
Then it passes
Scenario: Missing lang attribute on html element
Given a page with the HTML:
"""
<!DOCTYPE html>
<html>
<head>
<title>Language missing</title>
</head>
<body>
<h1>The language is missing</h1>
</body>
</html>
"""
When I test the "Indicating language: Html must have lang attribute" standard
Then it fails with the message:
"""
html tag has no lang attribute: /html
"""