html5/spec Overview.html,1.1163,1.1164

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv14044

Modified Files:
	Overview.html 
Log Message:
Try a new way of handling images that the author doesn't know much about. (whatwg r1972)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1163
retrieving revision 1.1164
diff -u -d -r1.1163 -r1.1164
--- Overview.html	2 Aug 2008 09:23:31 -0000	1.1163
+++ Overview.html	4 Aug 2008 07:53:04 -0000	1.1164
@@ -27,7 +27,7 @@
     for HTML and XHTML</h2>
 
    <h2 class="no-num no-toc" id=editors0><!-- "W3C Working Draft" -->
-    Editor's Draft <!--ZZZ--> 2 August 2008</h2>
+    Editor's Draft <!--ZZZ--> 4 August 2008</h2>
 
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
@@ -199,7 +199,7 @@
 
   <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is
    the W3C working group responsible for this specification's progress along
-   the W3C Recommendation track. <!--ZZZ:--> This specification is the 2
+   the W3C Recommendation track. <!--ZZZ:--> This specification is the 4
    August 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--></p>
   <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
   <!-- relationship to other work (required) -->
@@ -15670,13 +15670,13 @@
    attack.
 
   <p>Once the resource has been fetched, if the image is a valid and
-   supported image, the user agent must <a href="#firing4">fire a <code
-   title=event-load>load</code> event</a> on the <code><a
-   href="#img">img</a></code> element (this happens after <code
-   title=dom-img-complete><a href="#complete">complete</a></code> starts
-   returning true). If the fetching process fails without a response from the
-   remote server, or it completes but the image is not a valid or supported
-   image, the user agent must <a href="#firing5">fire an <code
+   supported image, then the image is said to be <i>available</i>; the user
+   agent must <a href="#firing4">fire a <code title=event-load>load</code>
+   event</a> on the <code><a href="#img">img</a></code> element (this happens
+   after <code title=dom-img-complete><a href="#complete">complete</a></code>
+   starts returning true). If the fetching process fails without a response
+   from the remote server, or it completes but the image is not a valid or
+   supported image, the user agent must <a href="#firing5">fire an <code
    title=event-error>error</code> event</a> on the <code><a
    href="#img">img</a></code> element.
 
@@ -15706,29 +15706,122 @@
 
   <hr>
 
-  <p>The element represents the image specified by the <code
-   title=attr-img-src><a href="#src">src</a></code> attribute.
+  <p>What an <code><a href="#img">img</a></code> element represents depends
+   on the <code title=attr-img-src><a href="#src">src</a></code> attribute
+   and the <code title=attr-img-alt><a href="#alt0">alt</a></code> attribute.
 
-  <p>When the <code title=attr-img-alt><a href="#alt0">alt</a></code>
-   attribute is present and its value is the empty string, the image
-   supplements the surrounding content. In such cases, the image may be
-   omitted in the rendering without affecting the meaning of the document. If
-   the image is not available, then the element represents nothing.
+  <dl class=switch>
+   <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 the empty string
 
-  <p>When the <code title=attr-img-alt><a href="#alt0">alt</a></code>
-   attribute is present and its value is not the empty string, the image is a
-   graphical equivalent of the string given in the <code
-   title=attr-img-alt><a href="#alt0">alt</a></code> attribute. In such
-   cases, the image may be replaced in the rendering by the string given in
-   the attribute without significantly affecting the meaning of the document.
-   If the image is not available, then the element represents that string
-   instead.
+   <dd>
+    <p>The image is either decorative or supplemental to the rest of the
+     content, redundant with some other information in the document.</p>
 
-  <p>When the <code title=attr-img-alt><a href="#alt0">alt</a></code>
-   attribute is missing, the image represents a key part of the content.
-   Non-visual user agents should apply image analysis heuristics to help the
-   user make sense of the image. If the image is not available, the element
-   represents some indication that the image is missing.
+    <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 nothing, and may be omitted
+     completely from the rendering. 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 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 (})
+
+   <dd>
+    <p>The image is a key part of the content, and there is no textual
+     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>
+
+    <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>
+
+   <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>
+    <p>The image's role in the document is unknown.</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 may display some sort of
+     indicator that the image is not being rendered.</p>
+
+   <dt>If the <code title=attr-img-src><a href="#src">src</a></code>
+    attribute is not set and the <code title=attr-img-alt><a
+    href="#alt0">alt</a></code> attribute is set to the empty string
+
+   <dd>
+    <p>The element represents nothing.</p>
+
+   <dt>If the <code title=attr-img-src><a href="#src">src</a></code>
+    attribute is not 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 element represents the text given by 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 not 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 (})
+
+   <dd>
+    <p>The user agent should display some sort of indicator that an image is
+     missing, providing to the user the information regarding the kind of
+     image that it would be (as derived from the <code title=attr-img-alt><a
+     href="#alt0">alt</a></code> attribute).</p>
+
+   <dt>If neither the <code title=attr-img-src><a href="#src">src</a></code>
+    attribute nor the <code title=attr-img-alt><a href="#alt0">alt</a></code>
+    attribute are set
+
+   <dd>
+    <p>The element represents nothing.</p>
+  </dl>
 
   <p>The <code title=attr-img-alt><a href="#alt0">alt</a></code> attribute
    does not represent advisory information. User agents must not present the
@@ -15736,10 +15829,12 @@
    attribute in the same way as content of the <code title=attr-title><a
    href="#title">title</a></code> attribute.
 
-  <p>If the <code title=attr-img-src><a href="#src">src</a></code> attribute
-   is omitted, the image represents whatever string is given by the element's
-   <code title=attr-img-alt><a href="#alt0">alt</a></code> attribute, if any,
-   or nothing, if that attribute is empty or absent.
+  <p>User agents may always provide the user with the option to display any
+   image, or to prevent any image from being displayed. User agents may also
+   apply image analysis heuristics to help the user make sense of the image
+   when the user is unable to make direct use of the image, e.g. due to a
+   visual disability or because they are using a text terminal with no
+   graphics capabilities.
 
   <p>The <em>contents</em> of <code><a href="#img">img</a></code> elements,
    if any, are ignored for the purposes of rendering.
@@ -15853,6 +15948,20 @@
 this time was simply the letter S! How had he not seen that before? It all
 came together now. The phone call where Hector had referred to a lion's tail,
 the time Marco had stuck his tongue out...&lt;/p></pre>
+
+   <p>Here it is not known at the time of publication what the image will be,
+    only that it will be a coat of arms of some kind, and thus no replacement
+    text can be provided, and instead only the kind of image is provided:</p>
+
+   <pre>&lt;p>The last user to have uploaded a coat of arms uploaded this one:&lt;/p>
+&lt;p>&lt;img src="last-uploaded-coat-of-arms.cgi" alt="{user-uploaded coat of arms}">&lt;/p></pre>
+
+   <p>Ideally, the author would find a way to provide real replacement text
+    even in this case, e.g. by asking the previous user. Not providing
+    replacement text makes the document more difficult to use for people who
+    are unable to view images, e.g. blind users, or users or very
+    low-bandwidth connections or who pay by the byte, or users who are forced
+    to use a text-only Web browser.</p>
   </div>
 
   <div class=example>
@@ -16184,13 +16293,14 @@
      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 may be omitted, but the <code
-     title=attr-img-alt><a href="#alt0">alt</a></code> attribute should be
-     included, with a useful value, if at all possible.</p>
+     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>
 
     <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
-     specified with an empty value.</p>
+     omitted or specified with an empty value.</p>
 
     <div class=example>
      <p>A screenshot in a gallery of screenshots for a new OS, with some
@@ -16209,12 +16319,14 @@
            list of open applications, and a clock."></strong>
  &lt;legend>Screenshot of a KDE desktop.&lt;/legend>
 &lt;/figure></pre>
+    </div>
 
+    <div class=example>
      <p>A photo on a photo-sharing site, if the site received the image with
       no metadata other than the caption:</p>
 
      <pre>&lt;figure>
- <strong>&lt;img src="1100670787_6a7c664aef.jpg"></strong>
+ <strong>&lt;img src="1100670787_6a7c664aef.jpg" alt="{photo}"></strong>
  &lt;legend>Bubbles traveled everywhere with us.&lt;/legend>
 &lt;/figure></pre>
 
@@ -16229,7 +16341,7 @@
       Rorschach inkblot test.</p>
 
      <pre>&lt;figure>
- <strong>&lt;img src="/commons/a/a7/Rorschach1.jpg"></strong>
+ <strong>&lt;img src="/commons/a/a7/Rorschach1.jpg" alt="{inkblot test}"></strong>
  &lt;legend>A black outline of the first of the ten cards
  in the Rorschach inkblot test.&lt;/legend>
 &lt;/figure></pre>
@@ -16255,9 +16367,9 @@
      browser, or because they are listening to the page being read out by a
      hands-free automobile voice Web browser, or simply because they are
      blind), the <code title=attr-img-alt><a href="#alt0">alt</a></code>
-     attribute is only allowed to be omitted when no alternative text is
-     available and none can be made available, e.g. on automated image
-     gallery sites.</p>
+     attribute is only allowed to contain the <em>kind</em> of image rather
+     than replacement text when no alternative text is available and none can
+     be made available, e.g. on automated image gallery sites.</p>
 
    <dt>An image in an e-mail or document intended for a specific person who
     is known to be able to view images
@@ -16274,6 +16386,11 @@
      abilities might not include easily seeing images.</p>
   </dl>
 
+  <p>The <code title=attr-img-alt><a href="#alt0">alt</a></code> attribute's
+   value must not start with a U+007B LEFT CURLY BRACKET character ({) and
+   end with a U+007D RIGHT CURLY BRACKET character (}), unless the attribute
+   is giving the <em>kind</em> of image rather than replacement text.
+
   <h4 id=the-iframe><span class=secno>4.7.3 </span>The <dfn
    id=iframe><code>iframe</code></dfn> element</h4>
 

Received on Monday, 4 August 2008 07:53:44 UTC