- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 04 Aug 2008 20:37:03 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv6544
Modified Files:
Overview.html
Log Message:
Changes to fix the problems Lachy found. (credit: lh) (whatwg r1988)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1179
retrieving revision 1.1180
diff -u -d -r1.1179 -r1.1180
--- Overview.html 4 Aug 2008 20:11:38 -0000 1.1179
+++ Overview.html 4 Aug 2008 20:37:00 -0000 1.1180
@@ -15765,27 +15765,6 @@
<dt>If the <code title=attr-img-src><a href="#src">src</a></code>
attribute is set and the <code title=attr-img-alt><a
- href="#alt0">alt</a></code> attribute is set to a string with at least
- one character whose first character is not a U+007B LEFT CURLY BRACKET
- character ({) or whose last character is not a U+007D RIGHT CURLY BRACKET
- character (})
-
- <dd>
- <p>The image is a key part of the content; the <code
- title=attr-img-alt><a href="#alt0">alt</a></code> attribute gives a
- textual equivalent or replacement for the image.</p>
-
- <p>If the image is available and the user agent is configured to display
- that image, then the element represents the image specified by the <code
- title=attr-img-src><a href="#src">src</a></code> attribute.</p>
-
- <p>Otherwise, the element represents the text given by the <code
- title=attr-img-alt><a href="#alt0">alt</a></code> attribute. User agents
- may provide the user with a notification that an image is present but
- has been omitted from the rendering.</p>
-
- <dt>If the <code title=attr-img-src><a href="#src">src</a></code>
- attribute is set and the <code title=attr-img-alt><a
href="#alt0">alt</a></code> attribute is set to a string whose first
character is a U+007B LEFT CURLY BRACKET character ({) and whose last
character is a U+007D RIGHT CURLY BRACKET character (})
@@ -15795,16 +15774,40 @@
equivalent of the image available. The string consisting of all the
characters between the first and the last character of the value of the
<code title=attr-img-alt><a href="#alt0">alt</a></code> attribute gives
- the kind of image (e.g. photo, diagram, user-uploaded image).</p>
+ the kind of image (e.g. photo, diagram, user-uploaded image). If that
+ value is the empty string (i.e. the attribute is just "<code
+ title="">{}</code>"), then even the kind of image being shown is not
+ known.</p>
<p>If the image is available, the element represents the image specified
by the <code title=attr-img-src><a href="#src">src</a></code> attribute.</p>
<p>If the image is not available or if the user agent is not configured
to display the image, then the user agent should display some sort of
- indicator that the image is not being rendered, providing to the user
- the information regarding the kind of image that is (as derived from the
- <code title=attr-img-alt><a href="#alt0">alt</a></code> attribute).</p>
+ indicator that the image is not being rendered, if possible providing to
+ the user the information regarding the kind of image that is (as derived
+ from the <code title=attr-img-alt><a href="#alt0">alt</a></code>
+ attribute).</p>
+
+ <dt>If the <code title=attr-img-src><a href="#src">src</a></code>
+ attribute is set and the <code title=attr-img-alt><a
+ href="#alt0">alt</a></code> attribute is set to a value that isn't
+ matched by the previous two entries (not empty, not "<code
+ title="">{...}</code>"
+
+ <dd>
+ <p>The image is a key part of the content; the <code
+ title=attr-img-alt><a href="#alt0">alt</a></code> attribute gives a
+ textual equivalent or replacement for the image.</p>
+
+ <p>If the image is available and the user agent is configured to display
+ that image, then the element represents the image specified by the <code
+ title=attr-img-src><a href="#src">src</a></code> attribute.</p>
+
+ <p>Otherwise, the element represents the text given by the <code
+ title=attr-img-alt><a href="#alt0">alt</a></code> attribute. User agents
+ may provide the user with a notification that an image is present but
+ has been omitted from the rendering.</p>
<dt>If the <code title=attr-img-src><a href="#src">src</a></code>
attribute is set and the <code title=attr-img-alt><a
@@ -16421,14 +16424,21 @@
be given as the contents of the <code title=attr-img-alt><a
href="#alt0">alt</a></code> attribute.
- <p>In a rare subset of these cases, there might be no alternative text
- available. This could be the case, for instance, on a photo upload site,
- if the site has received 8000 photos from a user without the user
- annotating any of them. In such cases, the <code title=attr-img-alt><a
- href="#alt0">alt</a></code> attribute's value must be a description of the
- <em>kind</em> of image, surrounded by braces ("{" and "}"). The kind of
- image is something along the lines of "photo", "diagram", "painting",
- "user-uploaded image", etc.
+ <p>In some unfortunate cases, there might be no alternative text available,
+ either because the image is obtained in some automated fashion without any
+ associated alternative text, or because the nature of the images is such
+ that no alternative text can be obtained. In such cases, the <code
+ title=attr-img-alt><a href="#alt0">alt</a></code> attribute's value must
+ be a description of the <em>kind</em> of image, surrounded by braces ("{"
+ and "}"), if that is known. The kind of image is something along the lines
+ of "photo", "diagram", "painting", "user-uploaded image", etc. If even the
+ kind of image cannot be determined, then the string <code
+ title="">{}</code> must be used.
+
+ <p class=note>Such cases are to be kept to an absolute minimum. If there is
+ even the slightest possibility of the author having the ability to provide
+ real alternative text, then it would not be acceptable to provide the
+ "<code title="">{...}</code>"-style value.
<p>In any case, if an image is a key part of the content, the <code
title=attr-img-alt><a href="#alt0">alt</a></code> attribute must not be
@@ -16468,6 +16478,37 @@
</div>
<div class=example>
+ <p>A blind user's blog in which a photo taken by the user is shown.
+ Initially, the user might not have any idea what the photo he took shows:</p>
+
+ <pre><article>
+ <h1>I took a photo</h1>
+ <p>I went out today and took a photo!</p>
+ <figure>
+ <img src="photo2.jpeg" alt="{photograph}">
+ <legend>A photograph taken blindly from my front porch.</legend>
+ </figure>
+</article></pre>
+
+ <p>Eventually though, the user might obtain a description of the image
+ from his friends and could then include alternative text:</p>
+
+ <pre><article>
+ <h1>I took a photo</h1>
+ <p>I went out today and took a photo!</p>
+ <figure>
+ <img src="photo2.jpeg" alt="The photograph shows my hummingbird
+ feeder hanging from the edge of my roof. It is half full, but there
+ are no birds around. In the background, out-of-focus trees fill the
+ shot. The feeder is made of wood with a metal grate, and it contains
+ peanuts. The edge of the roof is wooden too, and is painted white
+ with light blue streaks.">
+ <legend>A photograph taken blindly from my front porch.</legend>
+ </figure>
+</article></pre>
+ </div>
+
+ <div class=example>
<p>Sometimes there simply is no text that can do justice to an image. For
example, there is little that can be said to usefully describe a
Rorschach inkblot test.</p>
Received on Monday, 4 August 2008 20:37:37 UTC