[html5] r4454 - [e] (0) Clarify how to handle unknown language codes. Fixing http://www.w3.org/B [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Dec 18 18:05:16 PST 2009


Author: ianh
Date: 2009-12-18 18:05:12 -0800 (Fri, 18 Dec 2009)
New Revision: 4454

Modified:
   complete.html
   index
   source
Log:
[e] (0) Clarify how to handle unknown language codes.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8151

Modified: complete.html
===================================================================
--- complete.html	2009-12-19 01:34:22 UTC (rev 4453)
+++ complete.html	2009-12-19 02:05:12 UTC (rev 4454)
@@ -8134,9 +8134,20 @@
   unknown (the empty string).</p>
 
   <p>If the resulting value is not a recognized language code, then it
-  must be treated as an unknown language (as if the value was the
-  empty string).</p>
+  must be treated as an unknown language having the given language
+  code, distinct from all other languages. For the purposes of
+  round-tripping or communicating with other services that expect
+  language codes, user agents should pass unknown language codes
+  through unmodified.</p>
 
+  <p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be matched by the selector <code title="">:lang('xyzzy')</code> (e.g. in CSS), but it would not be
+  matched by <code title="">:lang('abcde')</code>, even though both
+  are equally invalid. Similarly, if a Web browser and screen reader
+  working in unison communicated about the language of the element,
+  the browser would tell the screen reader that the language was
+  "xyzzy", even if it knew it was invalid, just in case the screen
+  reader actually supported a language with that code after all.</p>
+
   <hr><p>User agents may use the element's language to determine proper
   processing or rendering (e.g. in the selection of appropriate
   fonts or pronunciations, or for dictionary selection). <!--User

Modified: index
===================================================================
--- index	2009-12-19 01:34:22 UTC (rev 4453)
+++ index	2009-12-19 02:05:12 UTC (rev 4454)
@@ -7969,9 +7969,20 @@
   unknown (the empty string).</p>
 
   <p>If the resulting value is not a recognized language code, then it
-  must be treated as an unknown language (as if the value was the
-  empty string).</p>
+  must be treated as an unknown language having the given language
+  code, distinct from all other languages. For the purposes of
+  round-tripping or communicating with other services that expect
+  language codes, user agents should pass unknown language codes
+  through unmodified.</p>
 
+  <p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be matched by the selector <code title="">:lang('xyzzy')</code> (e.g. in CSS), but it would not be
+  matched by <code title="">:lang('abcde')</code>, even though both
+  are equally invalid. Similarly, if a Web browser and screen reader
+  working in unison communicated about the language of the element,
+  the browser would tell the screen reader that the language was
+  "xyzzy", even if it knew it was invalid, just in case the screen
+  reader actually supported a language with that code after all.</p>
+
   <hr><p>User agents may use the element's language to determine proper
   processing or rendering (e.g. in the selection of appropriate
   fonts or pronunciations, or for dictionary selection). <!--User

Modified: source
===================================================================
--- source	2009-12-19 01:34:22 UTC (rev 4453)
+++ source	2009-12-19 02:05:12 UTC (rev 4454)
@@ -8087,9 +8087,22 @@
   unknown (the empty string).</p>
 
   <p>If the resulting value is not a recognized language code, then it
-  must be treated as an unknown language (as if the value was the
-  empty string).</p>
+  must be treated as an unknown language having the given language
+  code, distinct from all other languages. For the purposes of
+  round-tripping or communicating with other services that expect
+  language codes, user agents should pass unknown language codes
+  through unmodified.</p>
 
+  <p class="example">Thus, for instance, an element with <code
+  title="">lang="xyzzy"</code> would be matched by the selector <code
+  title="">:lang('xyzzy')</code> (e.g. in CSS), but it would not be
+  matched by <code title="">:lang('abcde')</code>, even though both
+  are equally invalid. Similarly, if a Web browser and screen reader
+  working in unison communicated about the language of the element,
+  the browser would tell the screen reader that the language was
+  "xyzzy", even if it knew it was invalid, just in case the screen
+  reader actually supported a language with that code after all.</p>
+
   <hr>
 
   <p>User agents may use the element's language to determine proper




More information about the Commit-Watchers mailing list