Re: [Bug 6543] New: Mint a new element for figure captions

On Feb 9, 2009, at 1:17 AM, bugzilla@wiggum.w3.org wrote:

>
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=6543
>
>           Summary: Mint a new element for figure captions
>           Product: HTML WG
>           Version: unspecified
>          Platform: PC
>        OS/Version: All
>            Status: NEW
>          Severity: normal
>          Priority: P2
>         Component: Spec proposals
>        AssignedTo: dave.null@w3.org
>        ReportedBy: hsivonen@iki.fi
>         QAContact: public-html-bugzilla@w3.org
>                CC: ian@hixie.ch, mike@w3.org, public-html@w3.org
>
>
> Currently, HTML 5 specifies that the caption for <figure> is  
> represented by the
> <legend> element. Unfortunately, the <legend> element implies a  
> <fieldset> in
> the HTML parser in already shipped and installed instances of Gecko.  
> If
> <legend> is used, this is a rather notable barrier for author  
> adoption of
> <figure> even if the generation of implied fieldset were removed in  
> a future
> release.
>
> Furthermore, the <legend> element comes with form-related DOM  
> baggage: the
> HTMLLegendElement interface from DOM Level 2 HTML.
>
> Since <caption> is also legacy-encumbered, I suggest minting a new  
> element to
> remove the adoption barriers for <figure> and its caption.
>
> Since the English thesaurus has been exhausted, I suggest minting a  
> new element
> name that has some qualifying prefix for the word "caption": e.g.  
> <figcaption>.
> (I'm assuming here that <rubric> wouldn't be appropriate.)

Since it seems "caption" is really the word we're looking for, but  
legacy parsing wants caption to be properly placed in a table, why not  
simply make a legacy synonym element to the figure element as has been  
suggested in the past[1].

With this approach, the parsing algorithm could be updated to permit  
'caption' elements in "figure" elements in addition to the "table"  
element. In the meantime, authors can use:

<table f >
      <caption>some caption text</caption>
      <tr><td><img src='uri' alt='alt text' >
</table>

in the same way they will eventually use

<figure>
      <caption>some caption text</caption>
     <img src='uri' alt='alt text' >
</figure>

in all XML parsed HTML and HTML5 parsed text/html in the future. Note  
the use of the "f" boolean minimized attribute to indicate this is a  
figure element and almost the same character count in the legacy  
compatible approach as the figure example.

With this approach authors get immediate CSS support for figures that  
I expect behaves much the way we would want the figure caption to  
behave.

figure, table[f] {caption-side: bottom; }

  or

figure, table[f] {caption-side: top; }

Sure it's a little contrived in the interim, but there's a lot in  
HTML5 that's a little contrived. And it works today!

Take care,
Rob

[1]: <http://esw.w3.org/topic/HTML/InterimLegacyBridgingMarkup>

ps, I'll ad this to bugzilla, but I think its worth discussing in the  
broader WG

Received on Monday, 9 February 2009 08:13:41 UTC