Re: can an img be a link within figure?

2007/7/5, Ben Boyle:
>
> <figure>
> <a href="some link"><img src="some image" ...></a>
> <legend>optional legend</legend>
> </figure>
>
> This would not be conforming in the current spec right? <figure> can
> only contain an embedded content element (which <img> is), but not a
> link? This is possibly not an issue for other embedded content but
> seems a big change for images, which often are links.
>
> http://www.w3.org/html/wg/html5/#the-figure
> (Just checking I'm reading the spec right)

I'm the reading the spec the same. And I also find it troublesome.

I propose allowing <a> as a child of <figure> in the case it has only
one child which is an <img> (with no "significant text" around it).

Here's an example (in French, but you'll get the idea "visually") of
where I'd have needed a linked image within a figure (don't look at
the markup, it's awful: generated with WordPress' WYSIWYG editor)

-- 
Thomas Broyer

Received on Thursday, 5 July 2007 13:17:02 UTC