Skip to content

Commit 6ff13a7

Browse files
Add link to "Declaring language in HTML" to 3.1.1, 3.1.2, H57, H58 (#4462)
This change adds an additional link in the references section. Here is a [view of the files changes](https://github.com/w3c/wcag/pull/4462/files?diff=split&w=1) which excludes the white space changes. Closes #4453 --------- Co-authored-by: Mike Gower <mikegower@gmail.com>
1 parent a8ca06b commit 6ff13a7

4 files changed

Lines changed: 88 additions & 141 deletions

File tree

‎techniques/html/H57.html‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<body>
88
<h1>Using the language attribute on the <code class="language-html">HTML</code> element</h1>
99
<section class="meta">
10-
<p class="id">ID: H57</p>
11-
<p id="sc">3.1.1 Language of Page</p>
12-
<p class="technology">Technology: html</p>
13-
<p class="type">Type: Technique</p>
10+
<p class="id">ID: H57</p>
11+
<p id="sc">3.1.1 Language of Page</p>
12+
<p class="technology">Technology: html</p>
13+
<p class="type">Type: Technique</p>
1414
</section>
1515
<section id="applicability">
1616
<h2>When to Use</h2>
@@ -33,12 +33,12 @@ <h2>Examples</h2>
3333
<h3>Defining the content of an HTML document to be in French</h3>
3434
<div lang="fr">
3535
<pre xml:space="preserve"><code class="language-html">&lt;!doctype html&gt;
36-
&lt;html lang="fr"&gt;
36+
&lt;html lang="fr"&gt;
3737
&lt;head&gt;
3838
&lt;meta charset="utf-8"&gt;
3939
&lt;title&gt;document écrit en français&lt;/title&gt;
40-
&lt;/head&gt;
41-
&lt;body&gt;
40+
&lt;/head&gt;
41+
&lt;body&gt;
4242
... document écrit en français ...
4343
&lt;/body&gt;
4444
&lt;/html&gt;</code></pre>
@@ -49,7 +49,7 @@ <h3>Defining the content of an HTML document to be in French</h3>
4949
<h2>Tests</h2>
5050
<section class="procedure">
5151
<h3>Procedure</h3>
52-
<p>Examine the <code class="language-html">html</code> element of the document.</p>
52+
<p>Examine the <code class="language-html">html</code> element of the document.</p>
5353
<ol>
5454
<li>Check that the <code class="language-html">html</code> element has a <code class="language-html">lang</code> attribute.</li>
5555
<li>Check that the value of the <code class="language-html">lang</code> attribute conforms to <a href="https://www.rfc-editor.org/info/bcp47">BCP 47: Tags for Identifying Languages; Matching of Language Tags</a> or its successor and reflects the primary language used by the web page.</li>
@@ -69,7 +69,7 @@ <h2>Related Techniques</h2>
6969
</ul>
7070
</section>
7171
<section id="resources">
72-
<h2>Resources</h2>
72+
<h2>Resources</h2>
7373
<ul>
7474
<li>
7575
<a href="https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes">HTML - The <code class="language-html">lang</code> and <code class="language-html">xml:lang</code> attributes</a>.
@@ -83,7 +83,10 @@ <h2>Resources</h2>
8383
<li>
8484
<a href="https://www.w3.org/International/articles/language-tags/">Language tags in HTML and XML</a>.
8585
</li>
86-
</ul>
86+
<li>
87+
<a href="https://www.w3.org/International/questions/qa-html-language-declarations">Declaring language in HTML</a>
88+
</li>
89+
</ul>
8790
</section>
8891
</body>
8992
</html>

‎techniques/html/H58.html‎

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h2>When to Use</h2>
2020
<section id="description">
2121
<h2>Description</h2>
2222
<p>The objective of this technique is to clearly identify any changes in language on a page by using the <code class="language-html">lang</code> attribute.</p>
23-
23+
2424
<p>Allowed values for the <code class="language-html">lang</code> attribute are indicated in the resources referenced below. Language tags use a primary code to indicate the language, and optional sub-codes (separated by hyphen characters) to indicate variants of the language. For instance, English is indicated with the primary code <code class="language-html">"en"</code>; British English and American English can be distinguished by using <code class="language-html">"en-GB"</code> and <code class="language-html">"en-US"</code>, respectively. Use of the primary code is important for this technique. Use of sub-codes is optional but may be helpful in certain circumstances.</p>
2525
</section>
2626
<section id="examples">
@@ -69,20 +69,23 @@ <h2>Related Techniques</h2>
6969
</section>
7070
<section id="resources">
7171
<h2>Resources</h2>
72-
<ul>
73-
<li>
74-
<a href="https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes">HTML - The <code class="language-html">lang</code> and <code class="language-html">xml:lang</code> attributes</a>.
75-
</li>
76-
<li>
77-
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang">HTML "<code class="language-html">lang</code>" attribute on the Mozilla Developer Network</a>.
78-
</li>
79-
<li>
80-
<a href="https://www.rfc-editor.org/info/bcp47">BCP 47: Tags for Identifying Languages; Matching of Language Tags</a>.
81-
</li>
82-
<li>
83-
<a href="https://www.w3.org/International/articles/language-tags/">Language tags in HTML and XML</a>.
84-
</li>
85-
</ul>
72+
<ul>
73+
<li>
74+
<a href="https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes">HTML - The <code class="language-html">lang</code> and <code class="language-html">xml:lang</code> attributes</a>.
75+
</li>
76+
<li>
77+
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang">HTML "<code class="language-html">lang</code>" attribute on the Mozilla Developer Network</a>.
78+
</li>
79+
<li>
80+
<a href="https://www.rfc-editor.org/info/bcp47">BCP 47: Tags for Identifying Languages; Matching of Language Tags</a>.
81+
</li>
82+
<li>
83+
<a href="https://www.w3.org/International/articles/language-tags/">Language tags in HTML and XML</a>.
84+
</li>
85+
<li>
86+
<a href="https://www.w3.org/International/questions/qa-html-language-declarations">Declaring language in HTML</a>
87+
</li>
88+
</ul>
8689
</section>
8790
</body>
8891
</html>

‎understanding/20/language-of-page.html‎

Lines changed: 23 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88
<body>
99
<h1>Understanding Language of Page</h1>
10-
10+
1111
<section id="brief">
1212
<h2>In brief</h2>
1313
<dl>
@@ -17,11 +17,10 @@ <h2>In brief</h2>
1717
</dl>
1818

1919
</section>
20-
20+
2121
<section id="intent">
2222
<h2>Intent of Language of Page</h2>
23-
24-
23+
2524
<p>
2625
The intent of this success criterion is to ensure that content developers provide
2726
information in the web page that user agents need to present text and other linguistic
@@ -30,142 +29,99 @@ <h2>Intent of Language of Page</h2>
3029
can load the correct pronunciation rules. Visual browsers can display characters and
3130
scripts correctly. Media players can show captions correctly. As a result, users with
3231
disabilities will be better able to understand the content.
33-
3432
</p>
35-
3633
<p>The default human language of the web page is the default text-processing language
37-
as discussed in
34+
as discussed in
3835
<a href="https://www.w3.org/International/techniques/authoring-html#gslang">Internationalization Best Practices: Specifying Language in XHTML &amp; HTML Content</a>. When a web page uses several languages, the default text-processing language is
3936
the language which is used most. (If several languages are used equally, the first
40-
language used should be chosen as the default human language.)
41-
37+
language used should be chosen as the default human language.)
4238
</p>
43-
39+
4440
<div class="note">
45-
4641
<p>
4742
For multilingual sites targeting Conformance Level A, the Working Group strongly encourages
4843
developers to follow Success Criterion 3.1.2 as well even though that is a Level AA
4944
success criterion.
50-
51-
5245
</p>
53-
5446
</div>
55-
56-
5747
</section>
5848
<section id="benefits">
5949
<h2>Benefits of Language of Page</h2>
60-
61-
50+
6251
<p>This success criterion helps:</p>
63-
52+
6453
<ul>
65-
6654
<li>people who use screen readers or other technologies that convert text into synthetic
6755
speech;
6856
</li>
69-
7057
<li>people who find it difficult to read written material with fluency and accuracy, such
7158
as recognizing characters and alphabets or decoding words;
7259
</li>
73-
7460
<li>people with certain cognitive, language and learning disabilities who use text-to-speech
7561
software
76-
7762
</li>
78-
7963
<li>people who rely on captions for synchronized media.</li>
80-
8164
</ul>
82-
8365
</section>
84-
66+
8567
<section id="examples">
8668
<h2>Examples of Language of Page</h2>
87-
69+
8870
<dl>
8971
<dt>Example 1. A web page with content in two languages</dt>
9072
<dd>A web page produced in Germany and written in HTML includes content in both German
9173
and English, but most of the content is in German. The default human language is identified
9274
as German (de) by the lang attribute on the html element.</dd>
9375
</dl>
94-
9576
</section>
96-
77+
9778
<section id="resources">
9879
<h2>Resources for Language of Page</h2>
99-
100-
80+
10181
<ul>
102-
10382
<li>
104-
10583
<a href="https://www.w3.org/International/techniques/authoring-html#gslang">Internationalization Best Practices: Specifying Language in XHTML &amp; HTML Content</a>
106-
10784
</li>
108-
109-
85+
<li>
86+
<a href="https://www.w3.org/International/questions/qa-html-language-declarations">Declaring language in HTML</a>
87+
</li>
11088
</ul>
111-
89+
11290
</section>
113-
91+
11492
<section id="techniques">
11593
<h2>Techniques for Language of Page</h2>
116-
117-
94+
11895
<section id="sufficient">
11996
<h3>Sufficient Techniques for Language of Page</h3>
120-
121-
97+
12298
<ul>
123-
12499
<li>
125-
126100
<a href="../Techniques/html/H57" class="html">Using the lang attribute of the html element</a>
127-
128101
</li>
129-
130102
<li>
131-
132103
<a href="../Techniques/pdf/PDF16" class="pdf"></a>
133-
134104
</li>
135-
136105
<li>
137-
138106
<a href="../Techniques/pdf/PDF19" class="pdf"></a>
139-
140107
</li>
141-
142108
</ul>
143-
144109
</section>
145-
110+
146111
<section id="advisory">
147112
<h3>Additional Techniques (Advisory) for Language of Page</h3>
148-
149-
113+
150114
<ul>
151-
152115
<li>
153-
154116
<a href="../Techniques/server-side-script/SVR5" class="server">Specifying the default language in the HTTP header</a>
155-
156117
</li>
157-
158118
</ul>
159-
160119
</section>
161-
120+
162121
<section id="failure">
163122
<h3>Failures for Language of Page</h3>
164-
165-
123+
166124
</section>
167-
168125
</section>
169-
170126
</body>
171127
</html>

0 commit comments

Comments
 (0)