W3C home > Mailing lists > Public > public-html-diffs@w3.org > December 2009

hixie: Clarify how to handle unknown language codes. (whatwg r4454)

From: poot <cvsmail@w3.org>
Date: Sat, 19 Dec 2009 11:05:32 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20091219020533.0C5322BBE6@toro.w3.mag.keio.ac.jp>
hixie: Clarify how to handle unknown language codes. (whatwg r4454)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3553&r2=1.3554&f=h
http://html5.org/tools/web-apps-tracker?from=4453&to=4454

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3553
retrieving revision 1.3554
diff -u -d -r1.3553 -r1.3554
--- Overview.html	19 Dec 2009 01:34:30 -0000	1.3553
+++ Overview.html	19 Dec 2009 02:05:21 -0000	1.3554
@@ -7217,8 +7217,19 @@
   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
Received on Saturday, 19 December 2009 02:06:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:14:16 GMT