W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] The IMG element, proposing a CAPTION attribute

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Thu, 23 Nov 2006 22:11:28 -0500
Message-ID: <456662E0.6080301@earthlink.net>
Alexey Feldgendler wrote:
> On Thu, 23 Nov 2006 03:27:31 +0600, Henri Sivonen <hsivonen at iki.fi> wrote:
>>> <label for="fig1" type="title">...</label>
>> 
>> <label> is not good, because it is reasonable to style form control
>> labels the way the platform styles labels, but the styling may not be
>> appropriate for figure captions. Also, the for attribute is now
>> supposed to refer to a form control.
> 
> I agree that reusing <label> can cause problems, so I'd like to find a brand new name, too.

  Agreed, since a label and a caption are not semantically equivalent.

>> I think it is better to introduce a <figcaption> or something than to
>> confuse what <label> is.
> 
> I don't like <figcaption> for two reasons. First, it contains the word "caption" while I propose
> using the new element in "title", "alt", and "label" roles at least.

   I don't see a figure caption as being semantically the same as any of
these. Also, a caption might refer to or describe multiple images.

> Second, it contains the word "figure", but I think this can be more
generic and work for other elements which have
> %Text attributes.

   I think we have two separate issues here. You're trying to address a
valid concern, but it has nothing to do with figures and figure
captions, and there's no reason to avoid markup for figures just because
we want to address the limitations of attributes like |title| and |alt|.

> Maybe <title-text>, [...]

   The |title| attribute is supposed to provide "advisory information",
so why not <advisory> or <adv>?

>[...] <alt-text> [...]

   Huh? Why not just <alternate> or <alt>???

| <img id="blah" [...]><alt for="blah">content</alt>

   This could be combined with the |data| attribute for better fallback:

| <img id="blah" [...] alt="simple content">
| <alt for="blah" data="AltContent.xhtml"></alt>

> and <label-text> for each of the three purposes?

   The only thing that you'd use <label-text> for is <optgroup>, since
|label| for <option> is supposed to be a shorter form of the contents of
the element. I don't think that group names for <option> elements is a
sufficient use case to justify this element.
Received on Thursday, 23 November 2006 19:11:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC