requiring the alt attribute [was Re: Another HTML5 alt conformance question for clarification]

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 10:11:02 UTC