RE: [XHTML2] Suggestion: generalize CAPTION element

This is closely related to a few areas I've touched:

* XForms uses <label> in many places. (It was formerly called <caption>, but
changed at the request of the CSS group) Recent drafts of XHTML 2.0 use a
<label> element under <nl>.

* The "elemental XHTML" document proposed a widely-available <title>
element, replacing the title attribute. This, however, provides non-visible
(except through tooltips, etc.) additional information.
http://dubinko.info/writing/elemental/


Thanks,

.micah

-----Original Message-----
From: Bert Bos [mailto:bert@w3.org]
Sent: Tuesday, February 04, 2003 8:53 AM
To: www-html@w3.org
Subject: [XHTML2] Suggestion: generalize CAPTION element



I like the generalization of the SRC (and COORDS) attribute in XHTML2
to nearly all elements. But there is still one aspect of HTML+/HTML3
that hasn't made it back into HTML yet and that is the CAPTION
element.

It seems to me that associating a caption with an image is such a
fundamental operation, that it should be expressed by semantic
mark-up, rather than by visual proximity (or other purely stylistic
means).

Currently I do this:

    <div class=figure>
      <p><img src=...>
      <p class=caption>...
    </div>

but that DIV.figure is no more than a convention and any parser would
have to know that the author is me in order to understand that the
text and the image have any special relation. I think Google's image
search could be significantly improved if its robots knew how to
recognize captions.

So I'm asking that XHTML not only generalizes the SRC attribute, but
also the CAPTION element:

    <p src="diagram.svg">
      <caption>Diagram of the main relations.</caption>
      <!-- text alternative: -->
      The root node has several child nodes, which interconnect.
    </p>

(HTML3 also proposed a CREDITS element, but I think that is less
important. The best place for credits is probably inside the image
itself anyway, in the form of embedded or linked metadata, while the
caption depends on the document that uses the image.)



Bert

PS. It is not clear how the above could be handled with CSS. We will
have to invent something new in CSS3. But that shouldn't be a
hindrance to making XHTML as elegant as possible.

-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Tuesday, 4 February 2003 12:49:09 UTC