W3C home > Mailing lists > Public > public-html@w3.org > November 2009

Re: ISSUE-83 ACTION-152 Change Proposal for the use of dt/dd in figure and details

From: Jeroen van der Gun <noreplytopreventspam@blijbol.nl>
Date: Sat, 28 Nov 2009 17:52:54 +0100
Message-ID: <9945efe50911280852p1bb6ac9bjcc006f5da4fce141@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Maciej Stachowiak <mjs@apple.com>, public-html <public-html@w3.org>
To Maciej:
- If you don't try to style the dt and dd childs of figure and details
directly, there is no problem at all.
- If you apply styles to the figure/details element, the only thing
you need to do is create the figure/details element through
JavaScript. Styles of the figure/details element itself will not leak.

*Maybe* XSLT provides a way to move my 'hack' into JavaScript for the
real div haters (by translating the dd's and dt's into a new element).
However, I pretty much don't know anything about XSLT so I'll leave
this idea to someone else.

Personally I wouldn't use JavaScript element creation in HTML5
documents at all. Adding div and span elements does the job well, it
does not change any semantics of the document (so it's not bad if it
stays there longer than needed), it is not browser-specific and I
assume the page loads faster than having to wait for an external
script to load.

This is not a reason to drop the new elements since they do provide
additional semantic information for user agents that do support them.
The figure element clearly links the caption of an image to the image
itself and indicates that the contents are not part of the main
content. User agents may use this information to enhance accessibility
(e.g. by allowing to skip over everything related to the image) and
search indexing bots can better understand the page. Pick a random
page from Wikipedia with images and you have a practical application
of the element.

Jeroen van der Gun

2009/11/28 Tab Atkins Jr. <jackalmage@gmail.com>:
> On Fri, Nov 27, 2009 at 10:13 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>> This does seem to mitigate the concern. I'm not sure whether it completely
>> eliminates it. Is <figure> any trickier to use correctly than other new
>> HTML5 elements, with this technique?
>
> Marginally trickier.  The js hack used for the other elements is
> conceptually simpler, but this hack doesn't depend on js being
> available, which is a plus.  I don't think the difference in
> trickiness is significant.
>
> ~TJ
>
Received on Saturday, 28 November 2009 16:54:18 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:54 UTC