HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
648711234[Conformance Checkers] More useful conformance rules and advice for bidi formatting characters2011-08-17 19:23
@@ -12408,55 +12408,117 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
   explicitly terminated by a U+202C POP DIRECTIONAL FORMATTING
   character. This helps reduce incidences of text being reused in a
   manner that has unforeseen effects on the bidirectional
   algorithm.</p>
 
   <p>The aforementioned restrictions are defined by specifying that
   certain parts of documents form <span>bidirectional-algorithm
   formatting character ranges</span>, and then imposing a requirement
   on such ranges.</p>
 
-  <p>The string resulting from the concatenation of the data of all of
-  an <span title="HTML elements">HTML element</span>'s <span
-  title="text node">text nodes</span>, if any, is a <span
+  <p>The strings resulting from the applying the following algorithm
+  to an <span title="HTML elements">HTML element</span> <var
+  title="">element</var> are <span>bidirectional-algorithm formatting
+  character ranges</span>:</p>
+
+  <ol>
+
+   <li><p>Let <var title="">output</var> be an empty list of strings.</p></li>
+
+   <li><p>Let <var title="">string</var> be an empty string.</p></li>
+
+   <li><p>Let <var title="">node</var> be the first child node of <var
+   title="">element</var>, if any, or null otherwise.</p></li>
+
+   <!-- while node != null do -->
+   <li><p><i>Loop</i>: If <var title="">node</var> is null, jump to
+   the step labeled <i>end</i>.</p></li>
+
+   <li>
+
+    <p>Process <var title="">node</var> according to the first
+    matching step from the following list:</p>
+
+    <dl class="switch">
+
+     <dt>If <var title="">node</var> is a <span>text node</span></dt>
+
+     <dd><p>Append the text data of <var title="">node</var> to <var title="">string</var>.</p></dd>
+
+
+     <dt>If <var title="">node</var> is an <span title="HTML elements">HTML element</span> that is <span>flow content</span> but that is not also <span>phrasing content</span></dt>
+
+     <dd><p>If <var title="">string</var> is not the empty string,
+     push <var title="">string</var> onto <var title="">output</var>,
+     and let <var title="">string</var> be empty string.</p></dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd>Do nothing.</dd>
+
+    </dl>
+
+   </li>
+
+   <li><p>Let <var title="">node</var> be <var title="">node</var>'s
+   next sibling, if any, or null otherwise.</p></li>
+
+   <li><p>Jump to the step labeled <i>loop</i>.</p></li>
+   <!-- end while -->
+
+   <li><p><i>End</i>: If <var title="">string</var> is not the empty
+   string, push <var title="">string</var> onto <var
+   title="">output</var>.</p></li>
+
+   <li><p>Return <var title="">output</var> as the
+   <span>bidirectional-algorithm formatting character
+   ranges</span>.</p></li>
+
+  </ol>
+
+  <p>The value of a namespace-less attribute of an <span title="HTML
+  elements">HTML element</span> is a <span
   title="bidirectional-algorithm formatting character
   ranges">bidirectional-algorithm formatting character
   range</span>.</p>
 
-  <p>The value of a namespace-less attribute of an <span title="HTML
-  elements">HTML element</span> is a <span
+<!--(this is unnecessarily pedantic)
+  <p>The text data of a comment node is a <span
   title="bidirectional-algorithm formatting character
   ranges">bidirectional-algorithm formatting character
   range</span>.</p>
+-->
 
   <p>Any strings that, as described above, are
   <dfn>bidirectional-algorithm formatting character ranges</dfn> must
   match the <code title="">string</code> production in the following
   ABNF, the character set for which is Unicode. <a
   href="#refsABNF">[ABNF]</a></p>
 
   <pre>string        = *( plaintext ( embedding / override ) ) plaintext
 embedding     = ( lre / rle ) string pdf
 override      = ( lro / rlo ) string pdf
 lre           = %x202A ; U+202A LEFT-TO-RIGHT EMBEDDING
 rle           = %x202B ; U+202B RIGHT-TO-LEFT EMBEDDING
 lro           = %x202D ; U+202D LEFT-TO-RIGHT OVERRIDE
 rlo           = %x202E ; U+202E RIGHT-TO-LEFT OVERRIDE
 pdf           = %x202C ; U+202C POP DIRECTIONAL FORMATTING
 plaintext     = *( %x0000-2029 / %x202F-10FFFF )
                 ; any string with no bidirectional-algorithm formatting characters</pre>
 
-  <p class="note">For convenience, where possible authors will likely
-  prefer to use the <code title="attr-dir">dir</code> attribute, the
-  <code>bdo</code> element, and the <code>bdi</code> element, rather
-  than maintaining the bidirectional-algorithm formatting characters
-  manually.</p>
+  <p class="note">Authors are encouraged to use the <code
+  title="attr-dir">dir</code> attribute, the <code>bdo</code> element,
+  and the <code>bdi</code> element, rather than maintaining the
+  bidirectional-algorithm formatting characters manually. The
+  bidirectional-algorithm formatting characters interact poorly with
+  CSS.</p>
 
 
 
   <h4><dfn>WAI-ARIA</dfn></h4>
 
   <p>Authors may use the ARIA <code title="attr-aria-role">role</code>
   and <code title="attr-aria-*">aria-*</code> attributes on <span>HTML
   elements</span>, in accordance with the requirements described in
   the ARIA specifications, except where these conflict with the
   <span>strong native semantics</span>

|