- From: <bugzilla@jessica.w3.org>
- Date: Thu, 06 Nov 2014 08:04:05 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=12835 --- Comment #12 from Bart <bart.humphries@gmail.com> --- (In reply to Ian 'Hixie' Hickson from comment #11) > If you wrapped the <figcaption> in something, it would no longer be a child > of the <figure> element. Yes, that's correct. The current HTML5 spec says figcaption must be first/last child of figure and that's a bug. You should be able to wrap figcaption in something without violating the HTML5 specification. Here's why: When linking an image and a caption (to a larger image, to another page, to anything), there are three possibilities. 1. Wrap everything in a link: <a href=something-big.png> <figure> <img src=something-small.png> <figcaption>something big, click for larger version</figcaption> </figure> </a> Result: Undesired - especially if you make the figure large enough that a descriptive caption has enough room to really display, you end up with lots of blank space on either side of the image in the figure box. 2. Wrap the image in a link, then wrap the caption text in a link inside the figcaption: <figure> <a href=something-big.png> <img src=something-small.png> </a> <figcaption><a href=something-big.png>something big, click for larger version</a></figcaption> </figure> Result: Undesired - if the image source is updated and a new image is generated with a new name to get around far-caching LocalStorage caching, two sources must now be updated for the same image. 3. Wrap the image and figcaption in a link: <figure> <a href=something-big.png> <img src=something-small.png> <figcaption>something big, click for larger version</figcaption> </a> </figure> Result: Desired outcome - one link, one thing to update and keep current, only desired elements are turned into links. However, this is not currently allowed by the HTML5 spec. Figcaption should be able to be wrapped in something else between it and figure. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Thursday, 6 November 2014 08:04:07 UTC