[whatwg] add html-attribute for "responsive images"

On Feb 8, 2012, at 7:29 PM, Jason Grigsby wrote:

On Feb 8, 2012, at 8:54 AM, FOUSHEE, SEAN wrote:

I'm late to this discussion so pardon me if this has already been discussed, by using the same logic as the <srclist> why not just create <figlist> to go along with the <figure> element?

When a bunch of us discussed this on an etherpad a while back, we ruled <figure> out because:

* Completely redefines semantics and content model of an already new element.
* Current use includes multiple images
* Current use includes non-images like code samples, video, etc.


Of course, this doesn?t mean we were right about ruling it out. :-)


Thanks for the clarification.

The fact that the <figure> element is structured to allow us to define multiple images seems like a good fit for this approach, especially since it's going to end up using the new tag(s) anyway if the page needs to group multiple responsive images together:

<img src="default1.jpg" alt="" list="firstimage">
<srclist id="firstimage">
<source href="small1.jpg" media="min-width:320px">
<source href="medium1.jpg" media="min-width:720px">
<source href="fullsize1.jpg" media="min-width:1200px">
<img src="default2.jpg" alt="" list="secondimage">
<srclist id="secondimage">
<source href="small2.jpg" media="min-width:320px">
<source href="medium2.jpg" media="min-width:720px">
<source href="fullsize2.jpg" media="min-width:1200px">
<!-- etc etc etc -->
<figcaption>Multiple responsive images grouped in the figure element</figcaption>

But I agree with David that this feels very bloated, and honestly I'd hate to think of the things my students would throw at me if I were to present this as the approach to handle responsive images in HTML. It's bad enough we have to encode and serve up at least three different video formats with a possible fallback just to utilize the <video> tag, but to do this for every image would be a nightmare.

Sean Foushe?
Instructor, Graphic Communications
Tarrant County College, NE Campus
828 Harwood Rd.
Hurst, TX 76054
(817) 515.6596
sean.foushee at tccd.edu<mailto:sean.foushee at tccd.edu>

Received on Wednesday, 8 February 2012 19:23:18 UTC