Re: Alt content [ was: gAdaptive Image Element Proposalh, now off HTML WG list ]

May I suggest a third option?

3) Img element is required within picture element, img element must have alt attribute - alt attribute is considered as alternative text for the entire picture element. 

A screen readers doesn't need to even be aware of the picture element - the picture element is all about the visual. All the screen reader needs to know is that there is an image and what the image represents.

One alt tag leaves less room for error, accomodates less experienced coders and keeps things dry.

Best regards,
Dave



On 30 Aug 2012, at 20:29, "Bruce Lawson" <brucel@opera.com> wrote:

> On Thu, 30 Aug 2012 20:10:54 +0100, Mathew Marquis <mat@matmarquis.com> wrote:
> 
>> 
>> 1) Duplicating the `alt` attribute on both `picture` and the fallback `img`
>> 2) `alt` specified on fallback `img`, using `aria-labelledby` on `picture` to reference the ID of the fallback `img`
> 
> 1) is better. For those who know what alt text is, it's already known and understood.
> 2) is  a different pattern, yet does the same thing as (1). It's harder to explain, more to understand, requires an id on the <img> which otherwise wouldn't need one, and is more to get wrong. It makes a11y harder, and we all know that we don't want more impediment
> 
> bruce
> 
> (speaking personally, not representing Opera)
> 

Received on Saturday, 1 September 2012 20:38:43 UTC