Re: Adaptive Image Element Proposal

Peter Winnberg, Thu, 30 Aug 2012 15:22:31 +0200:
> 2012/8/30 Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>:
>> (1) To repeat oneself is an antipattern. In my view, it should be
>> considered valid if the <img> does not contain any @alt as long as it
>> instead points, via aria-labelledby="", to the picture element:
>> 
>> <picture alt="Alernative text" id="pict" >
>>  <img src=file aria-labelledby="pict" />
>> </picture>
> 
> This is insufficent because older browsers / AT that have no support
> for the picture element

Well, they would be told that it exists.

> or ARIA would be left with an img element without alt text.

I don't understand what you say here.

> So the alt attribute is always needed on the img element.

So would the opposite be sufficient? I.e. the alt on the <img> but no 
alt on the <picture> *but* aria-labelledby on the <picture> instead:

 <picture aria-labelledby="pict" >
  <img src=file id="pict" alt="Alernative text" />
 </picture>

Originally, this was what I wanted to propose. However, one issue with 
is that it seemingly makes the conformance criteria of the <picture> 
element more intricate.

Another, and in theory simpler variant that I considered, was to DROP 
the alt attribute on the picture element and instead say that any child 
img element(s) with non-empty alt serve(s), by default, as the 
alternative text of a picture element.
-- 
leif halvard silli

Received on Thursday, 30 August 2012 13:56:57 UTC