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

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