Re: Issue 83 Change Proposal - caption attribute

On Fri, Jan 15, 2010 at 3:44 PM, Karl Dubost <karl+w3c@la-grange.net> wrote:
> Le 13 janv. 2010 à 15:57, Tab Atkins Jr. a écrit :
>> <figure><img src=foo><time caption
>> datetime=2010-01-11>January 11th, 2010</time></figure> is preferable
>> to <figure><img src=foo><caption><time datetime=2010-01-11>January
>> 11th, 2010</time></caption></figure>
>
> That means
>
>    <figure>
>       <img src="foo" alt="something foo"/>
>       <time caption="caption" datetime="2010-01-11">
>          January 11th, 2010
>       </time>
>    </figure>

Indeed, this is equally valid.

>> 1. Figure content model should be changed to "Flow Content".
>
> What does it solve to make it flow content?

Previously the figure content model only allowed dt and dd children.
Changing it to flow content just allows it to accept normal content.

>> 4. "caption" added to the list of global attributes in the "Global
>> Attributes" section.
>
> What does that mean to have for example:
>
>   <img caption="caption" src="foo" alt="something foo"/>

Same as <p caption>something foo</p>, just like having that image in
content anywhere else.

>   <footer caption="caption">…</footer>

Exactly the same as it would without the caption.

>   <noscript caption="caption">…</noscript>
>
> Strange no?

Putting it on noscript would indeed be strange, but the spec doesn't
have a category for "normal content elements".  Flow content
encompasses everything necessary, even if it ends up including a few
odd elements.

>> The caption attribute is invalid and
>> has no effect on any element that is not a direct child of a figure
>> element.
>
> It seems a lot of trouble to make a global attribute for only one construct.

Any more trouble than adding a new element?  I don't see the distinction.

> I could see something like
>
>    <figure>
>       <img src="foo" alt="something foo" id="linkme"/>
>       <time for="linkme" datetime="2010-01-11">
>          January 11th, 2010
>       </time>
>    </figure>
>
> which would give the freedom to have the title for the figure in the flow but also elsewhere.

Too much trouble when the nesting can automatically link caption to figure.

>    On <time for="linkme" datetime="2010-01-11">January 11th,
>    2010</time>, there was a wonderful thing happening.
>
>    <figure>
>       <img src="foo" alt="something foo" id="linkme"/>
>    </figure>

That's not exactly a caption for the figure anymore.  At least, I've
never seen a figure captioned like that in real life.

> If we go the way of an element, which I don't like very much, there are many possibilities. I'm a bit worried with the figcaption or alike because they restrict the element to one specific context and encourage markupbesity.
>
>    <figure>
>       <img src="foo" alt="something foo"/>
>       <heading>Awesome title for the image</heading>
>    </figure>
>
> or
>
>    <figure>
>       <img src="foo" alt="something foo"/>
>       <desc>Awesome title for the image</desc>
>    </figure>
>
> or
>
>    <figure>
>       <img src="foo" alt="something foo"/>
>       <cartouche>Awesome title for the image</cartouche>
>    </figure>
>
> or
>
>    <figure>
>       <img src="foo" alt="something foo"/>
>       <gloss>Awesome title for the image</gloss>
>    </figure>

If you have suggestions for names, they'll be very welcome on Maciej's
change proposal.  We're using fcaption and figcaption right now for
lack of anything better, despite quite a bit of suggestions.

~TJ

Received on Saturday, 16 January 2010 06:09:03 UTC