W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: can an img be a link within figure?

From: Thomas Broyer <t.broyer@gmail.com>
Date: Thu, 5 Jul 2007 15:16:56 +0200
Message-ID: <a9699fd20707050616h3ec5245aud5b895e3dd8678c3@mail.gmail.com>
To: public-html@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT