[whatwg] The IMG element, proposing a CAPTION attribute

Matthew Paul Thomas mpt at myrealbox.com
Sat Nov 11 21:24:53 PST 2006


On Nov 9, 2006, at 11:57 AM, Jeff Seager wrote:
> ...
> Among all literate people, I believe there is a longstanding 
> expectation that pictures are accompanied by meaningful descriptions 
> (usually below the image, but often to one side). The absence of image 
> captioning seems to me to be an oversight, or at least an overlooked 
> possibility, in the HTML/XHTML standards. As I was taught, a proper 
> caption should not describe the picture (as ALT should), but 
> complement or elucidate the information presented by the graphic.

alt= should not describe a picture, but rather be a text alternative, 
because a description is a non-sequitur in a non-visual medium. 
(Unless, perhaps, the UA precedes it with the phrase "And if you 
weren't so blind you could see an image here that shows...":-)

Anyway, I support the idea of a caption *element* to accompany images. 
This would have two benefits over an attribute:
1.  It could contain markup, which an attribute cannot.
2.  With a for= attribute, it could apply to an image elsewhere in the
     document, which would be useful for the print medium. For example:
         <p>
           <legend for="classphoto"><i class="printonly">Top left:</i>
           The class of 2006.</legend>
           <legend for="bandseniors"><i class="printonly">Top right:</i>
           Simone with her parents on graduation day.</legend>
         </p>
     (For the screen medium, ideally UAs would place a caption adjacent
     to the relevant image, regardless of where the caption occurred in
     the document.)

I suggest that this element behave in the opposite way from alt=: 
whereas alt= should be presented only if the image itself is *not* 
presented, the caption element should be presented only if the image 
itself *is* presented. Otherwise there would be the same problem with 
non-sequiturs in non-visual media as there is with descriptive alt=.

-- 
Matthew Paul Thomas
http://mpt.net.nz/




More information about the whatwg mailing list