10BC0 [css-text-3] Automatic hyphenation requires language tagging. #869. C… · w3c/csswg-drafts@9cf856e · GitHub
Skip to content

Commit 9cf856e

Browse files
committed
[css-text-3] Automatic hyphenation requires language tagging. #869. Closes PR #2741
1 parent dcb6db5 commit 9cf856e

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

css-text-3/Overview.bs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,18 @@ Languages and Typesetting</h3>
165165
the element is declared to be in, according to the rules of the
166166
<a href="https://www.w3.org/TR/CSS21/conform.html#doclanguage">document language</a>.
167167
For example, the rules for determining the <a>content language</a> of an HTML
168-
element use the <code>lang</code> attribute and are defined in [[HTML5]],
168+
are <a href="https://html.spec.whatwg.org/multipage/dom.html#language">defined</a> in [[HTML]],
169169
and the rules for determining the <a>content language</a> of an XML element use
170-
the <code>xml:lang</code> attribute and are
171-
<a href="https://www.w3.org/TR/REC-xml/#sec-lang-tag">defined</a> in [[XML10]].
170+
are <a href="https://www.w3.org/TR/REC-xml/#sec-lang-tag">defined</a> in [[XML10]].
172171
Note that it is possible for the <a>content language</a> of an element
173-
to be unknown.
172+
to be unknown--
173+
e.g. untagged content,
174+
or content in a <a>document language</a> that does not have a language-tagging facility
175+
is considered to have an unknown <a>content language</a>.
176+
177+
Note: Authors can tag content using the global <code>lang</code> attribute in HTML,
178+
the universal <code>xml:lang</code> attribute in XML,
179+
and the HTTP <code>Content-Language</code> header for content served over HTTP.
174180

175181
Language and writing system conventions can affect
176182
line breaking, hyphenation, justification, glyph selection,
@@ -1178,16 +1184,15 @@ Line Breaking Details</h3>
11781184

11791185
<p>Correct automatic hyphenation requires a hyphenation resource
11801186
appropriate to the language of the text being broken.
1181-
The UA is therefore only required to automatically hyphenate text
1187+
The UA must therefore only automatically hyphenate text
11821188
for which the <a>content language</a> is known
11831189
and for which it has an appropriate hyphenation resource.
11841190

11851191
<p class="advisement">
11861192
Authors should correctly tag their content’s <a lt="content language">language</a>
1187-
(e.g. using the HTML ''lang'' attribute)
1193+
(e.g. using the HTML <code>lang</code> attribute
1194+
or the HTTP <code>Content-Language</code> header)
11881195
in order to obtain correct automatic hyphenation.
1189-
UAs may refuse to automatically hyphenate untagged content
1190-
regardless of the 'hyphens' property value.
11911196

11921197
<p>When shaping scripts such as Arabic are allowed to break within words
11931198
due to hyphenation,

0 commit comments

Comments
 (0)