[Bug 18384] Consider adding an adaptive image element

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18384

steve faulkner <faulkner.steve@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |faulkner.steve@gmail.com

--- Comment #2 from steve faulkner <faulkner.steve@gmail.com> 2012-07-24 13:08:54 UTC ---
copied from email
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0127.html

I am concerned about the use of the
alt attribute on <picture> when it would be much better to allow text
alternatives inside the picture element.
Some of the advantages are:
Markup can be used to structure text alternative content.
The length of the alt text is no longer a constraint, as it is currently
for assistive tech.

current example
<picture alt="Description of image subject.">
<source srcset="small.jpg 1x, small-highres.jpg 2x">
<source media="(min-width: 18em)" srcset="med.jpg 1x, med-highres.jpg 2x">
<source media="(min-width: 45em)" srcset="large.jpg 1x, large-highres.jpg
2x">
<img src="small.jpg" alt="Description of image subject.">
</picture>

Is there any reason why you think the use of alt attribute on picture is
preferable to

<picture role="img">

<p>alt text</p>

<source srcset="small.jpg 1x, small-highres.jpg 2x">
<source media="(min-width: 18em)" srcset="med.jpg 1x, med-highres.jpg 2x">
<source media="(min-width: 45em)" srcset="large.jpg 1x, large-highres.jpg
2x">
<img src="small.jpg">

</picture>

note:role=img is just of polyfill purposes.

or


<figure>
<picture>
<source srcset="small.jpg 1x, small-highres.jpg 2x">
<source media="(min-width: 18em)" srcset="med.jpg 1x, med-highres.jpg 2x">
<source media="(min-width: 45em)" srcset="large.jpg 1x, large-highres.jpg
2x">

<img src="small.jpg">

</picture>
<figcaption>caption text</figcaption>
</figure>

I can understand that backwards compatibility may be of concern in the
first example, but that can be resolved through the use of CSS to clip or
hide text content if so desired.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 24 July 2012 13:09:00 UTC