You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds content for case where the element's content and attribute values
are in different languages
Closes#4064
Add the requested example for “The element's content and attribute
values are in different languages”.
Also:
1. updated some old attributes that didn’t do anything
2. changed bolded `p` tags to `h3` elements
---------
Co-authored-by: Kenneth G. Franqueiro <[email protected]>
Copy file name to clipboardExpand all lines: understanding/20/language-of-parts.html
+19-34Lines changed: 19 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -127,51 +127,36 @@ <h2>Benefits of Language of Parts</h2>
127
127
128
128
<sectionid="examples">
129
129
<h2>Examples of Language of Parts</h2>
130
-
131
-
<ul>
132
-
<li>
133
-
<p>
134
-
<strong>A German phrase in an English sentence.</strong>
135
-
</p>
136
-
<p>In the sentence, "He maintained that the DDR (German Democratic Republic) was just
137
-
a '<spanlang="de">Treppenwitz der Weltgeschichte</span>'," the German phrase '<spanlang="de">Treppenwitz der Weltgeschichte</span>' is marked as German. Depending on the markup language, English may either be marked
138
-
as the language for the entire document except where specified, or marked at the paragraph
139
-
level. When a screen reader encounters the German phrase, it changes pronunciation
140
-
rules from English to German to pronounce the word correctly.
141
-
</p>
142
-
</li>
143
-
<li>
144
-
<p>
145
-
<strong>Alternative language links</strong>
146
-
</p>
147
-
<p>An HTML web page includes links to versions of the page in other languages (e.g.,
148
-
<spanlang="de">Deutsch</span>, <spanlang="fr">Français</span>, <spanlang="nl">Nederlands</span>, <spanlang="ca">Catalan</span>, etc.). The text of each link is the name of the language, in that language. The language of each link is indicated via a <codeclass="att">lang</code> attribute.
149
-
</p>
150
-
<prexml:space="preserve"><code><ul>
130
+
131
+
<h3>A German phrase in an English sentence</h3>
132
+
<p>In the sentence, "He maintained that the DDR (German Democratic Republic) was just a '<spanlang="de">Treppenwitz der Weltgeschichte</span>'," the German phrase '<spanlang="de">Treppenwitz der Weltgeschichte</span>' is marked as German. Depending on the markup language, English may either be marked as the language for the entire document except where specified, or marked at the paragraph level. When a screen reader encounters the German phrase, it changes pronunciation rules from English to German to pronounce the word correctly.</p>
133
+
134
+
<h3>Alternative language links</h3>
135
+
<p>An HTML web page includes links to versions of the page in other languages (e.g.,
136
+
<spanlang="de">Deutsch</span>, <spanlang="fr">Français</span>, <spanlang="nl">Nederlands</span>, <spanlang="ca">Catalan</span>, etc.). The text of each link is the name of the language, in that language. The language of each link is indicated via a <codeclass="language-html">lang</code> attribute.</p>
<strong>"Podcast" used in a French sentence.</strong>
161
-
</p>
162
-
<p>Because "podcast" is part of the vernacular of the immediately surrounding text in
163
-
the following excerpt, "<spanlang="fr">À l'occasion de l'exposition "Energie éternelle. 1500 ans d'art indien", le Palais des Beaux-Arts de Bruxelles a lancé son premier podcast. Vous pouvez télécharger ce podcast au format M4A et MP3</span>", no indication of language change is required.
164
-
</p>
165
-
</li>
166
-
</ul>
144
+
145
+
<h3>"Podcast" used in a French sentence</h3>
146
+
<p>Because "podcast" is part of the vernacular of the immediately surrounding text in the following excerpt, "<spanlang="fr">À l'occasion de l'exposition "Energie éternelle. 1500 ans d'art indien", le Palais des Beaux-Arts de Bruxelles a lancé son premier podcast. Vous pouvez télécharger ce podcast au format M4A et MP3</span>", no indication of language change is required.</p>
147
+
148
+
<h3>The element's content and attribute values are in different languages</h3>
149
+
<p>This example assumes that the page's default content is in English. The link's <codeclass="language-html">title</code> attribute is in English, but the nested <codeclass="language-html">span</code> element that contains the word <spanlang="es">Español</span> has a <code>lang="es"</code> attribute.</p>
<ahref="https://html.spec.whatwg.org/multipage/dom.html#attr-lang">HTML - The <codeclass="att">lang</code> and <codeclass="att">xml:lang</code> attributes</a>.
159
+
<ahref="https://html.spec.whatwg.org/multipage/dom.html#attr-lang">HTML - The <codeclass="language-html">lang</code> and <codeclass="language-html">xml:lang</code> attributes</a>.
175
160
</li>
176
161
<li>
177
162
<ahref="https://www.w3.org/International/articles/language-tags/index.en">Language tags in HTML and XML</a>.
@@ -191,10 +176,10 @@ <h3>Sufficient Techniques for Language of Parts</h3>
191
176
192
177
<ul>
193
178
<li>
194
-
<ahref="../Techniques/html/H58"class="html">Using the lang attribute to identify changes in the human language</a>.
179
+
<ahref="../Techniques/html/H58">Using the lang attribute to identify changes in the human language</a>.
195
180
</li>
196
181
<li>
197
-
<ahref="../Techniques/pdf/PDF19"class="pdf">Specifying the language for a passage or phrase with the Lang entry in PDF documents</a>.
182
+
<ahref="../Techniques/pdf/PDF19">Specifying the language for a passage or phrase with the Lang entry in PDF documents</a>.
0 commit comments