Re: requiring the alt attribute

Hi ian,

Also, the draft currently says:

> The contents of img elements, if any, are ignored for the purposes  
> of rendering.

This is ill-advised since authors of XML serialized may want to take  
advantage of the IMG elements contents for alt text equivalents and  
XML serialization makes this possible. HTML5 should make it clear what  
order of precedence UAs should treat and IMG element that contains  
both an alt value other than null and a contents to the IMG element  
other than null. My preference would be for the contents of the IMG to  
take precedence over the alt attribute. In light of this, it would be  
necessary to say something like:

> Authors must provide alt text for every IMG element. The alt  
> attribute must be present and the particular requirements on  
> providing alt text for either the alt attribute's value and the IMG  
> element's contents (in the case of XML serialized HTML) are  
> described in the next section.

Then in the case of XML serialized documents the alt attribute should  
always be null (alt=''), while applying the same alt text requirements  
to the IMG element's contents as those described in the alt text sub- 
sections of 4.7.2.1.

Take care,
Rob

On Aug 24, 2008, at 1:09 PM, Robert J Burns wrote:

>
> Hi Ian,
>
> Re: the img section[1] and Issue-31
>
> On Aug 23, 2008, at 12:19 PM, Ian Hickson wrote:
>
>>
>> If you look through this section:
>>
>> http://www.whatwg.org/specs/web-apps/current-work/#alt
>>
>> ...you will see a number of "must" requirements that do indeed  
>> require the
>> alt="" attribute. The requirements are in fact much more detailed  
>> than
>> just requiring that the attribute be present; they also specify  
>> what the
>> attribute value must be in each of a large number of cases.
>>
>
> and
>
>> I have attempted to make the spec clear about this. Please let me  
>> know if
>> it is still ambiguous. Thanks!
>
>
> It would be much clearer if the following passages were changed to  
> add the phrase "alt attribute must be present and the particular"
>
>
>> The src attribute must be present, and must contain a valid URL  
>> referencing a non-interactive, optionally animated, image resource  
>> that is neither paged nor scripted.
>>
>> The _alt attribute must be present and the particular_ requirements  
>> on the alt attribute's value are described in the next section.
>
> Also the section describes what an IMG element represents.
>
>> What an img element represents depends on the src attribute and the  
>> alt attribute.
>
>
> It would be clearer to authors and implementors if it instead  
> maintained a description of the representation of an IMG element in  
> terms of its dual representation  as representing both the image and  
> the alt text. So for example the passage that reads:
>
>
>> If the src attribute is set and the alt attribute is not
>> The image's role in the document is unknown.
>>
>> If the image is available, the element represents the image  
>> specified by the src attribute and also an image whose alt value is  
>> missing (especially relevant for authoring and proofing tools).
>>
>> If the image is not available, if the user agent is not configured  
>> to display the image or at the user's discretion, then the user  
>> agent may display some sort of indicator that the image is not  
>> being rendered.
>>
> So while an image may be rendered or presented in various ways,  
> within an HTML document it represents both an embedded image  
> resource and the alt text equivalent that replaces the embedded  
> image (even when that alt text is null).
>
> Finally, section 4.7.2.1.11 should be eliminated. There's no reason  
> to include this exception.
>
> Take care,
>
> Rob
>
> [1]: <http://www.whatwg.org/specs/web-apps/current-work/#the-img>
>

Received on Sunday, 24 August 2008 12:14:33 UTC