RE: Adaptive Image Element Proposal

Adrian Roselli, Thu, 30 Aug 2012 17:10:29 +0000:
>> From: Leif Halvard Silli:
>>> Adrian Roselli, Thu, 30 Aug 2012 15:30:41 +0000:
>>>> From: Leif Halvard Silli [mailto:xn--mlform-iua@målform.no]
>>>>> Adrian Roselli, Thu, 30 Aug 2012 13:18:24 +0000:
>>>>>>> From: Leif Halvard Silli, Thursday, August 30, 2012 8:53 AM

Subject: <picture id=I alt=txt ><img aria-labelledby=I></picture>

> I feel that diligent authors who care

Absolutely. No problem with them.

> [...] However, making this a requirement for validation puts the
> onus on the developer and acts as a reminder to do his/her job.

That is why I propose a validatable rule w.r.t. aria-labelledby. The 
proposal from the editors does offer any new validatable rules. So we 
will probably see many img elements whose alt value differ from the 
picture element. (It is of course "validatable" in the sense that it is 
easy to see if two alt attribute are identical or not. However, they 
have not made into a rule.)

> Outside of human authors I see this is a simpler issue for WYSIWYG 
> applications and generated HTML to handle -- just duplicate the @alt 
> text that has been provided elsewhere (again, presuming the user has 
> even provided it). Getting toolmakers to do that, however, I know 
> from experience is an uphill battle, but is at least possible.

For toolmakers, it seems - to me - simpler to just let 
img@aria-labelledby point to the picture element. (Or, eventually, 
point from picture to img - but then we need validation rules for the 
picture element - instead.) Getting WYSIWYG tool *duplicate* alt 
attributes ... my guess is we will never see them do that. But I could 
be wrong.

>>  <figure>
>>   <ficaption>Caption</figcaption>
>>    <picture>
>>     <source src=files >
>>     <img src=file >
>>    </picture>
>>  </figure>
> 
> Your example has not @alt anywhere. Trying to stay in the scope of 
> the <picture> element proposal, I think it is missing two @alts.

Confer the spec:

]]
   If the src attribute is set and the alt attribute is not
   [...]
   If the image is a descendant of a figure element that has a child 
figcaption element, and, ignoring the figcaption element and its 
descendants, the figure element has no Text node descendants other than 
inter-element whitespace, and no embedded content descendant other than 
the img element, then the contents of the first such figcaption element 
are the caption information; abort these steps. 
[[

So, it seems - when I read it more closely now - that this example is 
*already* legal.

http://dev.w3.org/html5/spec/the-img-element.html#img-good

-- 
leif halvard silli

Received on Thursday, 30 August 2012 17:59:58 UTC