[html5] r7955 - [giow] (3) Another attempt at making directionality in various edge cases more u [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 11 15:03:36 PDT 2013


Author: ianh
Date: 2013-06-11 15:03:35 -0700 (Tue, 11 Jun 2013)
New Revision: 7955

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Another attempt at making directionality in various edge cases more useful and more intuitive.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17835
Affected topics: HTML, Rendering

Modified: complete.html
===================================================================
--- complete.html	2013-06-11 21:45:24 UTC (rev 7954)
+++ complete.html	2013-06-11 22:03:35 UTC (rev 7955)
@@ -9748,18 +9748,20 @@
 
   <dl class=switch><dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-ltr-state title=attr-dir-ltr-state>ltr</a> state</dt>
 
+   <dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
+   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
+
+   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is not in a state</dt>
+
    <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>
 
 
    <dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-rtl-state title=attr-dir-rtl-state>rtl</a> state</dt>
 
-   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
-
    <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</dd>
 
+   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <span title=attr-input-type-telephone>Telephone</span>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
 
-   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
-
    <dt>If the element is a <code><a href=#the-textarea-element>textarea</a></code> element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
    attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
 
@@ -9815,7 +9817,8 @@
     <p>If such a character is found and it is of bidirectional character type L, <a href=#the-directionality>the
     directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
-    <p>Otherwise, if the element is a <a href=#root-element>root element</a> or a <code><a href=#the-bdi-element>bdi</a></code> element,
+<!--CLEANUP-->
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a>,
     <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
     <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
@@ -9824,12 +9827,6 @@
    </dd>
 
 
-   <dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
-   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
-
-   <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>
-
-
    <dt>If the element has a parent element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is
    not in a defined state (i.e. it is not present or has an invalid value)</dt>
 
@@ -93376,7 +93373,7 @@
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
-[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
+[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
 [dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
 
 address, blockquote, center, div, figure, figcaption, footer, form,
@@ -93408,7 +93405,13 @@
 
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
+  <p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their
+  <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
+  <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
+  or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state) are expected to present an editing
+  user interface with a directionality that matches the element's 'direction' property.</p>
 
+
   <h4 id=quotes><span class=secno>14.3.6 </span>Quotes</h4>
 
   <p>This block is automatically generated from the Unicode Common
@@ -95115,7 +95118,7 @@
   <a href=#textarea-effective-width>textarea effective width</a>.</p>
 
   <p>The <dfn id=textarea-effective-width>textarea effective width</dfn> of a
-  <code><a href=#the-textarea-element>textarea</a></code> element is <span><var title="">size</var>×<var title="">avg</var> + <var title="">sbw</var></span>, where <var title="">size</var> is the
+  <code><a href=#the-textarea-element>textarea</a></code> element is <span title=""><var title="">size</var>×<var title="">avg</var> + <var title="">sbw</var></span>, where <var title="">size</var> is the
   element's <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character
   width</a>, <var title="">avg</var> is the average character width
   of the primary font of the element, in CSS pixels, and <var title="">sbw</var> is the width of a scroll bar, in CSS pixels. (The

Modified: index
===================================================================
--- index	2013-06-11 21:45:24 UTC (rev 7954)
+++ index	2013-06-11 22:03:35 UTC (rev 7955)
@@ -9748,18 +9748,20 @@
 
   <dl class=switch><dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-ltr-state title=attr-dir-ltr-state>ltr</a> state</dt>
 
+   <dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
+   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
+
+   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is not in a state</dt>
+
    <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>
 
 
    <dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-rtl-state title=attr-dir-rtl-state>rtl</a> state</dt>
 
-   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
-
    <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</dd>
 
+   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <span title=attr-input-type-telephone>Telephone</span>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
 
-   <dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
-
    <dt>If the element is a <code><a href=#the-textarea-element>textarea</a></code> element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
    attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
 
@@ -9815,7 +9817,8 @@
     <p>If such a character is found and it is of bidirectional character type L, <a href=#the-directionality>the
     directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
-    <p>Otherwise, if the element is a <a href=#root-element>root element</a> or a <code><a href=#the-bdi-element>bdi</a></code> element,
+<!--CLEANUP-->
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a>,
     <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
     <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
@@ -9824,12 +9827,6 @@
    </dd>
 
 
-   <dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
-   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
-
-   <dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>
-
-
    <dt>If the element has a parent element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is
    not in a defined state (i.e. it is not present or has an invalid value)</dt>
 
@@ -93376,7 +93373,7 @@
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
-[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
+[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
 [dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
 
 address, blockquote, center, div, figure, figcaption, footer, form,
@@ -93408,7 +93405,13 @@
 
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
+  <p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their
+  <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
+  <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
+  or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state) are expected to present an editing
+  user interface with a directionality that matches the element's 'direction' property.</p>
 
+
   <h4 id=quotes><span class=secno>14.3.6 </span>Quotes</h4>
 
   <p>This block is automatically generated from the Unicode Common
@@ -95115,7 +95118,7 @@
   <a href=#textarea-effective-width>textarea effective width</a>.</p>
 
   <p>The <dfn id=textarea-effective-width>textarea effective width</dfn> of a
-  <code><a href=#the-textarea-element>textarea</a></code> element is <span><var title="">size</var>×<var title="">avg</var> + <var title="">sbw</var></span>, where <var title="">size</var> is the
+  <code><a href=#the-textarea-element>textarea</a></code> element is <span title=""><var title="">size</var>×<var title="">avg</var> + <var title="">sbw</var></span>, where <var title="">size</var> is the
   element's <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character
   width</a>, <var title="">avg</var> is the average character width
   of the primary font of the element, in CSS pixels, and <var title="">sbw</var> is the width of a scroll bar, in CSS pixels. (The

Modified: source
===================================================================
--- source	2013-06-11 21:45:24 UTC (rev 7954)
+++ source	2013-06-11 22:03:35 UTC (rev 7955)
@@ -9662,6 +9662,14 @@
    <dt>If the element's <code title="attr-dir">dir</code> attribute is in the <span
    title="attr-dir-ltr-state">ltr</span> state</dt>
 
+   <dt>If the element is a <span>root element</span> and the <code title="attr-dir">dir</code>
+   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
+
+   <dt>If the element is an <code>input</code> element whose <code
+   title="attr-input-type">type</code> attribute is in the <span
+   title="attr-input-type-tel">Telephone</span> state, and the <code
+   title="attr-dir">dir</code> attribute is not in a state</dt>
+
    <dd><p><span>The directionality</span> of the element is '<span
    title="concept-ltr">ltr</span>'.</p></dd>
 
@@ -9669,20 +9677,14 @@
    <dt>If the element's <code title="attr-dir">dir</code> attribute is in the <span
    title="attr-dir-rtl-state">rtl</span> state</dt>
 
-   <dt>If the element is an <code>input</code> element whose <code
-   title="attr-input-type">type</code> attribute is in the <span
-   title="attr-input-type-tel">Telephone</span> state, and the <code
-   title="attr-dir">dir</code> attribute is in the <span
-   title="attr-dir-auto-state">auto</span> state</dt>
-
    <dd><p><span>The directionality</span> of the element is '<span
    title="concept-rtl">rtl</span>'.</p></dd>
 
-
    <dt>If the element is an <code>input</code> element whose <code
    title="attr-input-type">type</code> attribute is in the <span
    title="attr-input-type-text">Text</span>, <span
    title="attr-input-type-search">Search</span>, <span
+   title="attr-input-type-telephone">Telephone</span>, <span
    title="attr-input-type-url">URL</span>, or <span
    title="attr-input-type-email">E-mail</span> state, and the <code
    title="attr-dir">dir</code> attribute is in the <span
@@ -9752,7 +9754,8 @@
     <p>If such a character is found and it is of bidirectional character type L, <span>the
     directionality</span> of the element is '<span title="concept-ltr">ltr</span>'.</p>
 
-    <p>Otherwise, if the element is a <span>root element</span> or a <code>bdi</code> element,
+<!--CLEANUP-->
+    <p>Otherwise, if the element is a <span>root element</span>,
     <span>the directionality</span> of the element is '<span title="concept-ltr">ltr</span>'.</p>
 
     <p>Otherwise, <span>the directionality</span> of the element is the same as the element's parent
@@ -9761,13 +9764,6 @@
    </dd>
 
 
-   <dt>If the element is a <span>root element</span> and the <code title="attr-dir">dir</code>
-   attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>
-
-   <dd><p><span>The directionality</span> of the element is '<span
-   title="concept-ltr">ltr</span>'.</p></dd>
-
-
    <dt>If the element has a parent element and the <code title="attr-dir">dir</code> attribute is
    not in a defined state (i.e. it is not present or has an invalid value)</dt>
 
@@ -104389,7 +104385,7 @@
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
 
-[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
+[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
 [dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
 
 address, blockquote, center, div, figure, figcaption, footer, form,
@@ -104421,7 +104417,14 @@
 
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
+  <p>Input fields (i.e. <code>textarea</code> elements, and <code>input</code> elements when their
+  <code title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-text">Text</span>, <span title="attr-input-type-search">Search</span>,
+  <span title="attr-input-type-tel">Telephone</span>, <span title="attr-input-type-url">URL</span>,
+  or <span title="attr-input-type-email">E-mail</span> state) are expected to present an editing
+  user interface with a directionality that matches the element's 'direction' property.</p>
 
+
   <h4>Quotes</h4>
 
   <p>This block is automatically generated from the Unicode Common
@@ -106162,7 +106165,7 @@
   <span>textarea effective width</span>.</p>
 
   <p>The <dfn>textarea effective width</dfn> of a
-  <code>textarea</code> element is <span><var
+  <code>textarea</code> element is <span title=""><var
   title="">size</var>×<var title="">avg</var> + <var
   title="">sbw</var></span>, where <var title="">size</var> is the
   element's <span title="attr-textarea-cols-value">character




More information about the Commit-Watchers mailing list