[whatwg] <figure><img><* caption>

Tab Atkins Jr. jackalmage at gmail.com
Tue Dec 1 16:08:48 PST 2009


On Tue, Dec 1, 2009 at 6:01 PM, Hugh Guiney <hugh.guiney at gmail.com> wrote:
> Is there a reason we can't reuse <legend> (or <label>)? I don't think
> giving <p> an attribute that it can only use inside of <figure> is
> very straightforward.

Yes.  <legend> is documented as having rendering issues in all current
browsers if placed outside of a <fieldset> (for example, in some
browsers it will *generate a fieldset* around itself).  <label>
doesn't have appropriate keyboard accessibility when used for
<details>.

The @caption proposal isn't for an attribute on <p> only, but rather
for an attribute on any element that is a child of a <figure>.  (It's
just that most of the time using a <p> is most appropriate.)

~TJ



More information about the whatwg mailing list