HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2110

File a bug

SVNBugCommentTime (UTC)
2110[Authors] Emphasise that captions are not suitable alternative text.2008-08-23 09:36
Index: source
===================================================================
--- source	(revision 2109)
+++ source	(revision 2110)
@@ -14211,6 +14211,49 @@
 the Tokeniser.</p>
 <strong>&lt;p>&lt;img src="images/parsing-model-overview.png" alt="">&lt;/p></strong></pre>
 
+   <p>In these cases, it would be wrong to include alternative text
+   that consists of just a caption. If a caption is to be included,
+   then either the <code title="attr-title">title</code> attribute can
+   be used, or the <code>figure</code> and <code>legend</code>
+   elements can be used. In the latter case, the image would in fact
+   be a phrase or paragraph with an alternative graphical
+   representation, and would thus require alternative text.</p>
+
+   <pre>&lt;!-- Using the title="" attribute -->
+&lt;p>The network passes data to the Tokeniser stage, which
+passes data to the Tree Construction stage. From there, data goes
+to both the DOM and to Script Execution. Script Execution is
+linked to the DOM, and, using document.write(), passes data to
+the Tokeniser.&lt;/p>
+<strong>&lt;p>&lt;img src="images/parsing-model-overview.png" alt=""
+        title="Flowchart representation of the parsing model."></strong>&lt;/p></pre>
+
+   <pre>&lt;!-- Using &lt;figure> and &lt;legend> -->
+&lt;p>The network passes data to the Tokeniser stage, which
+passes data to the Tree Construction stage. From there, data goes
+to both the DOM and to Script Execution. Script Execution is
+linked to the DOM, and, using document.write(), passes data to
+the Tokeniser.&lt;/p>
+&lt;figure>
+ <strong>&lt;img src="images/parsing-model-overview.png" alt="The Network leads
+ to the Tokeniser, which leads to the Tree Construction. The Tree
+ Construction leads to two items. The first is Script Execution, which
+ leads via document.write() back to the Tokeniser. The second item
+ from which Tree Construction leads is the DOM. The DOM is related to
+ the Script Execution."></strong>
+ &lt;legend>Flowchart representation of the parsing model.&lt;/legend>
+&lt;/figure></pre>
+
+   <pre class="bad">&lt;!-- This is WRONG. Do not do this. Instead, do what the above examples do. -->
+&lt;p>The network passes data to the Tokeniser stage, which
+passes data to the Tree Construction stage. From there, data goes
+to both the DOM and to Script Execution. Script Execution is
+linked to the DOM, and, using document.write(), passes data to
+the Tokeniser.&lt;/p>
+&lt;p>&lt;img src="images/parsing-model-overview.png"
+        alt="Flowchart representation of the parsing model.">&lt;/p>
+&lt;!-- Never put the image's caption in the alt="" attribute! --></pre>
+
   </div>
 
   <div class="example">
@@ -14617,8 +14660,20 @@
 
 
 
+  <h6>Anti-patterns</h6>
 
+  <p>The <code title="attr-img-alt">alt</code> attribute's value
+  should never contain text that could be considered the image's
+  <em>caption</em>, <em>title</em>, or <em>legend</em>. It is supposed
+  to contain replacement text that could be used by users
+  <em>instead</em> of the image; it is not meant to supplement the
+  image. The <code title="attr-title">title</code> attribute can be
+  used for supplemental information.<p>
 
+
+
+
+
   <h4>The <dfn><code>iframe</code></dfn> element</h4>
 
   <dl class="element">

|