[html5] r1988 - [e] (0) Changes to fix the problems Lachy found. (credit: lh)
whatwg at whatwg.org
whatwg at whatwg.org
Mon Aug 4 13:36:57 PDT 2008
Author: ianh
Date: 2008-08-04 13:36:57 -0700 (Mon, 04 Aug 2008)
New Revision: 1988
Modified:
index
source
Log:
[e] (0) Changes to fix the problems Lachy found. (credit: lh)
Modified: index
===================================================================
--- index 2008-08-04 20:09:02 UTC (rev 1987)
+++ index 2008-08-04 20:36:57 UTC (rev 1988)
@@ -15670,27 +15670,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 (})
@@ -15700,19 +15679,43 @@
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
href="#alt0">alt</a></code> attribute is not
<dd>
@@ -16326,15 +16329,22 @@
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
omitted or specified with an empty value.
@@ -16373,6 +16383,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>
Modified: source
===================================================================
--- source 2008-08-04 20:09:02 UTC (rev 1987)
+++ source 2008-08-04 20:36:57 UTC (rev 1988)
@@ -13190,30 +13190,6 @@
<dt>If the <code title="attr-img-src">src</code> attribute is set
and the <code title="attr-img-alt">alt</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 (})</dt>
-
- <dd>
-
- <p>The image is a key part of the content; the <code
- title="attr-img-alt">alt</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">src</code>
- attribute.</p>
-
- <p>Otherwise, the element represents the text given by the <code
- title="attr-img-alt">alt</code> attribute. User agents may provide
- the user with a notification that an image is present but has been
- omitted from the rendering.</p>
-
- </dd>
-
- <dt>If the <code title="attr-img-src">src</code> attribute is set
- and the <code title="attr-img-alt">alt</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 (})</dt>
@@ -13224,7 +13200,10 @@
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">alt</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">src</code>
@@ -13233,13 +13212,36 @@
<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
+ 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">alt</code> attribute).</p>
</dd>
<dt>If the <code title="attr-img-src">src</code> attribute is set
+ and the <code title="attr-img-alt">alt</code> attribute is set to a
+ value that isn't matched by the previous two entries (not empty,
+ not "<code title="">{...}</code>"</dt>
+
+ <dd>
+
+ <p>The image is a key part of the content; the <code
+ title="attr-img-alt">alt</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">src</code>
+ attribute.</p>
+
+ <p>Otherwise, the element represents the text given by the <code
+ title="attr-img-alt">alt</code> attribute. User agents may provide
+ the user with a notification that an image is present but has been
+ omitted from the rendering.</p>
+
+ </dd>
+
+ <dt>If the <code title="attr-img-src">src</code> attribute is set
and the <code title="attr-img-alt">alt</code> attribute is not</dt>
<dd>
@@ -13917,15 +13919,24 @@
substitute for the image must be given as the contents of the
<code title="attr-img-alt">alt</code> attribute.</p>
- <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">alt</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>
+ <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">alt</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>
+ <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>
+
<p>In any case, if an image is a key part of the content, the
<code title="attr-img-alt">alt</code> attribute must not be
omitted or specified with an empty value.</p>
@@ -13969,6 +13980,40 @@
<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>
More information about the Commit-Watchers
mailing list