[whatwg] add html-attribute for "responsive images"
dvdgoss at gmail.com
Tue Feb 7 06:59:27 PST 2012
On 7 February 2012 14:00, Matthew Wilcox <mail at matthewwilcox.com> wrote:
> I'm glad this is making a reasonable amount of sense to people :)
> Please note however that this isn't just a case of "the image is cropped".
> It could be an entirely different image *as long as* it still carries the
> same semantic message. In that, the image in the About example is merely to
> give a visual representation of someone. As long as all of the scaled images
> do that, they do not need to be *the same image* re-cropped. In fact, it
> would be better in this case to have different images. Hence why it makes
> sense to have the ability to over-ride the alt attribute on each source.
> There's nothing to stop us saying that an alt attribute can be declared on
> the default image, and is only over-written if the <src> contains a new alt
> On Tuesday, Feb 7, 2012, at 7:35 AM, David Goss wrote:
>> I'm not really sure whether <source> should get an alt attribute - my
>> thinking is that if one alt attribute doesn't correctly describe all the
>> <source>s then perhaps they are different content. Matthew's example does
>> make sense, in that the extra alt attributes describe the way the image has
>> been cropped (although it's still the same image). But maybe it would be
>> better to only allow alt on the <img> to reinforce the idea that all the
>> <source>s should basically be the same image albeit
My point is that if the two images are supposed to have the same
semantic message, then you should be able to describe them both with
the same alt text (even if the differences between those images make
the alt text a little more vague than it might be). So, as you say,
you could have two different photos of the same person for different
media, but the alt text "photo of Matthew Wilcox" would be applicable
for both, so that's fine.
I'm with you in that I want the flexibility (e.g. the sources
shouldn't all have to be literally the same image just resized), I
just think saying "all sources must correspond with same alt text"
gives a nice clear definition of what's okay for authors.
More information about the whatwg