[html5] r5517 - [ac] (1) <figcaption> should only be used as a caption of a no-alt <img> if ther [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 26 13:00:49 PDT 2010


Author: ianh
Date: 2010-09-26 13:00:48 -0700 (Sun, 26 Sep 2010)
New Revision: 5517

Modified:
   complete.html
   index
   source
Log:
[ac] (1) <figcaption> should only be used as a caption of a no-alt <img> if there's no other content in the <figure>
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10596

Modified: complete.html
===================================================================
--- complete.html	2010-09-26 18:26:05 UTC (rev 5516)
+++ complete.html	2010-09-26 20:00:48 UTC (rev 5517)
@@ -9939,10 +9939,14 @@
   not, and must be ignored when following algorithms that define
   document and element semantics.</p>
 
-  <p>An element <var title="">A</var> is said to be <dfn id=preceded-or-followed>preceded or
-  followed</dfn> by a second element <var title="">B</var> if <var title="">A</var> and <var title="">B</var> have the same parent node
-  and there are no other element nodes or text nodes (other than
-  <a href=#inter-element-whitespace>inter-element whitespace</a>) between them.</p>
+  <p class=note>Thus, an element <var title="">A</var> is said to be
+  <i>preceded or followed</i> by a second element <var title="">B</var> if <var title="">A</var> and <var title="">B</var>
+  have the same parent node and there are no other element nodes or
+  text nodes (other than <a href=#inter-element-whitespace>inter-element whitespace</a>)
+  between them. Similarly, a node is the <i>only child</i> of an
+  element if that element contains no other nodes other than
+  <a href=#inter-element-whitespace>inter-element whitespace</a>, comment nodes, and processing
+  instruction nodes.</p>
 
   <p>Authors must not use <a href=#html-elements>HTML elements</a> anywhere except
   where they are explicitly allowed, as defined for each element, or
@@ -20582,10 +20586,15 @@
      that attribute is the caption information; abort these
      steps.</li>
 
-     <li><p>If the image is the child of a <code><a href=#the-figure-element>figure</a></code> element
-     that has a child <code><a href=#the-figcaption-element>figcaption</a></code> element, then the
-     contents of the first such <code><a href=#the-figcaption-element>figcaption</a></code> element are
-     the caption information; abort these steps.</li>
+     <li><p>If the image is a descendant of a <code><a href=#the-figure-element>figure</a></code>
+     element that has a child <code><a href=#the-figcaption-element>figcaption</a></code> element, and,
+     ignoring the <code><a href=#the-figcaption-element>figcaption</a></code> element and its descendants,
+     the <code><a href=#the-figure-element>figure</a></code> element has no text node descendants
+     other than <a href=#inter-element-whitespace>inter-element whitespace</a>, and no
+     <a href=#embedded-content>embedded content</a> descendant other than the
+     <code><a href=#the-img-element>img</a></code> element, then the contents of the first such
+     <code><a href=#the-figcaption-element>figcaption</a></code> element are the caption information;
+     abort these steps.</li>
 
     </ol></dd>
 
@@ -21510,10 +21519,15 @@
      of 'critical-no-alt' --><li>The <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute is
      present and has a non-empty value.</li>
 
-     <li>The <code><a href=#the-img-element>img</a></code> element is in a <code><a href=#the-figure-element>figure</a></code>
-     element that contains a <code><a href=#the-figcaption-element>figcaption</a></code> element that
-     contains content other than <a href=#inter-element-whitespace>inter-element
-     whitespace</a>.</li>
+     <li id=figcaption-as-alt-condition>The <code><a href=#the-img-element>img</a></code> element
+     is in a <code><a href=#the-figure-element>figure</a></code> element that contains a
+     <code><a href=#the-figcaption-element>figcaption</a></code> element that contains content other than
+     <a href=#inter-element-whitespace>inter-element whitespace</a>, and, ignoring the
+     <code><a href=#the-figcaption-element>figcaption</a></code> element and its descendants, the
+     <code><a href=#the-figure-element>figure</a></code> element has no text node descendants other
+     than <a href=#inter-element-whitespace>inter-element whitespace</a>, and no <a href=#embedded-content>embedded
+     content</a> descendant other than the <code><a href=#the-img-element>img</a></code>
+     element.</li>
 
     </ul><p class=note>Such cases are to be kept to an absolute
     minimum. If there is even the slightest possibility of the author
@@ -21706,9 +21720,8 @@
    above</a>).</li>
 
    <li>The <code><a href=#the-img-element>img</a></code> element is in a <code><a href=#the-figure-element>figure</a></code>
-   element that contains a <code><a href=#the-figcaption-element>figcaption</a></code> element that
-   contains content other than <a href=#inter-element-whitespace>inter-element whitespace</a>
-   (as <a href=#unknown-images>described above</a>).</li>
+   element that satisfies <a href=#figcaption-as-alt-condition>the
+   conditions described above</a>.</li>
 
    <!-- the following are additional entries not included in the
    aforementioned list, as they apply only to conformance checkers -->

Modified: index
===================================================================
--- index	2010-09-26 18:26:05 UTC (rev 5516)
+++ index	2010-09-26 20:00:48 UTC (rev 5517)
@@ -9916,10 +9916,14 @@
   not, and must be ignored when following algorithms that define
   document and element semantics.</p>
 
-  <p>An element <var title="">A</var> is said to be <dfn id=preceded-or-followed>preceded or
-  followed</dfn> by a second element <var title="">B</var> if <var title="">A</var> and <var title="">B</var> have the same parent node
-  and there are no other element nodes or text nodes (other than
-  <a href=#inter-element-whitespace>inter-element whitespace</a>) between them.</p>
+  <p class=note>Thus, an element <var title="">A</var> is said to be
+  <i>preceded or followed</i> by a second element <var title="">B</var> if <var title="">A</var> and <var title="">B</var>
+  have the same parent node and there are no other element nodes or
+  text nodes (other than <a href=#inter-element-whitespace>inter-element whitespace</a>)
+  between them. Similarly, a node is the <i>only child</i> of an
+  element if that element contains no other nodes other than
+  <a href=#inter-element-whitespace>inter-element whitespace</a>, comment nodes, and processing
+  instruction nodes.</p>
 
   <p>Authors must not use <a href=#html-elements>HTML elements</a> anywhere except
   where they are explicitly allowed, as defined for each element, or
@@ -20559,10 +20563,15 @@
      that attribute is the caption information; abort these
      steps.</li>
 
-     <li><p>If the image is the child of a <code><a href=#the-figure-element>figure</a></code> element
-     that has a child <code><a href=#the-figcaption-element>figcaption</a></code> element, then the
-     contents of the first such <code><a href=#the-figcaption-element>figcaption</a></code> element are
-     the caption information; abort these steps.</li>
+     <li><p>If the image is a descendant of a <code><a href=#the-figure-element>figure</a></code>
+     element that has a child <code><a href=#the-figcaption-element>figcaption</a></code> element, and,
+     ignoring the <code><a href=#the-figcaption-element>figcaption</a></code> element and its descendants,
+     the <code><a href=#the-figure-element>figure</a></code> element has no text node descendants
+     other than <a href=#inter-element-whitespace>inter-element whitespace</a>, and no
+     <a href=#embedded-content>embedded content</a> descendant other than the
+     <code><a href=#the-img-element>img</a></code> element, then the contents of the first such
+     <code><a href=#the-figcaption-element>figcaption</a></code> element are the caption information;
+     abort these steps.</li>
 
     </ol></dd>
 
@@ -21487,10 +21496,15 @@
      of 'critical-no-alt' --><li>The <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute is
      present and has a non-empty value.</li>
 
-     <li>The <code><a href=#the-img-element>img</a></code> element is in a <code><a href=#the-figure-element>figure</a></code>
-     element that contains a <code><a href=#the-figcaption-element>figcaption</a></code> element that
-     contains content other than <a href=#inter-element-whitespace>inter-element
-     whitespace</a>.</li>
+     <li id=figcaption-as-alt-condition>The <code><a href=#the-img-element>img</a></code> element
+     is in a <code><a href=#the-figure-element>figure</a></code> element that contains a
+     <code><a href=#the-figcaption-element>figcaption</a></code> element that contains content other than
+     <a href=#inter-element-whitespace>inter-element whitespace</a>, and, ignoring the
+     <code><a href=#the-figcaption-element>figcaption</a></code> element and its descendants, the
+     <code><a href=#the-figure-element>figure</a></code> element has no text node descendants other
+     than <a href=#inter-element-whitespace>inter-element whitespace</a>, and no <a href=#embedded-content>embedded
+     content</a> descendant other than the <code><a href=#the-img-element>img</a></code>
+     element.</li>
 
     </ul><p class=note>Such cases are to be kept to an absolute
     minimum. If there is even the slightest possibility of the author
@@ -21683,9 +21697,8 @@
    above</a>).</li>
 
    <li>The <code><a href=#the-img-element>img</a></code> element is in a <code><a href=#the-figure-element>figure</a></code>
-   element that contains a <code><a href=#the-figcaption-element>figcaption</a></code> element that
-   contains content other than <a href=#inter-element-whitespace>inter-element whitespace</a>
-   (as <a href=#unknown-images>described above</a>).</li>
+   element that satisfies <a href=#figcaption-as-alt-condition>the
+   conditions described above</a>.</li>
 
    <!-- the following are additional entries not included in the
    aforementioned list, as they apply only to conformance checkers -->

Modified: source
===================================================================
--- source	2010-09-26 18:26:05 UTC (rev 5516)
+++ source	2010-09-26 20:00:48 UTC (rev 5517)
@@ -10113,11 +10113,15 @@
   not, and must be ignored when following algorithms that define
   document and element semantics.</p>
 
-  <p>An element <var title="">A</var> is said to be <dfn>preceded or
-  followed</dfn> by a second element <var title="">B</var> if <var
-  title="">A</var> and <var title="">B</var> have the same parent node
-  and there are no other element nodes or text nodes (other than
-  <span>inter-element whitespace</span>) between them.</p>
+  <p class="note">Thus, an element <var title="">A</var> is said to be
+  <i>preceded or followed</i> by a second element <var
+  title="">B</var> if <var title="">A</var> and <var title="">B</var>
+  have the same parent node and there are no other element nodes or
+  text nodes (other than <span>inter-element whitespace</span>)
+  between them. Similarly, a node is the <i>only child</i> of an
+  element if that element contains no other nodes other than
+  <span>inter-element whitespace</span>, comment nodes, and processing
+  instruction nodes.</p>
 
   <p>Authors must not use <span>HTML elements</span> anywhere except
   where they are explicitly allowed, as defined for each element, or
@@ -21981,10 +21985,15 @@
      that attribute is the caption information; abort these
      steps.</p></li>
 
-     <li><p>If the image is the child of a <code>figure</code> element
-     that has a child <code>figcaption</code> element, then the
-     contents of the first such <code>figcaption</code> element are
-     the caption information; abort these steps.</p></li>
+     <li><p>If the image is a descendant of a <code>figure</code>
+     element that has a child <code>figcaption</code> element, and,
+     ignoring the <code>figcaption</code> element and its descendants,
+     the <code>figure</code> element has no text node descendants
+     other than <span>inter-element whitespace</span>, and no
+     <span>embedded content</span> descendant other than the
+     <code>img</code> element, then the contents of the first such
+     <code>figcaption</code> element are the caption information;
+     abort these steps.</p></li>
 
     </ol>
 
@@ -22966,10 +22975,15 @@
      <li>The <code title="attr-title">title</code> attribute is
      present and has a non-empty value.</li>
 
-     <li>The <code>img</code> element is in a <code>figure</code>
-     element that contains a <code>figcaption</code> element that
-     contains content other than <span>inter-element
-     whitespace</span>.</li>
+     <li id="figcaption-as-alt-condition">The <code>img</code> element
+     is in a <code>figure</code> element that contains a
+     <code>figcaption</code> element that contains content other than
+     <span>inter-element whitespace</span>, and, ignoring the
+     <code>figcaption</code> element and its descendants, the
+     <code>figure</code> element has no text node descendants other
+     than <span>inter-element whitespace</span>, and no <span>embedded
+     content</span> descendant other than the <code>img</code>
+     element.</p></li>
 
     </ul>
 
@@ -23177,9 +23191,8 @@
    above</a>).</li>
 
    <li>The <code>img</code> element is in a <code>figure</code>
-   element that contains a <code>figcaption</code> element that
-   contains content other than <span>inter-element whitespace</span>
-   (as <a href="#unknown-images">described above</a>).</li>
+   element that satisfies <a href="#figcaption-as-alt-condition">the
+   conditions described above</a>.</li>
 
    <!-- the following are additional entries not included in the
    aforementioned list, as they apply only to conformance checkers -->




More information about the Commit-Watchers mailing list