W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] ALT and equivalent representation

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Mon, 21 Apr 2008 08:59:03 +0100
Message-ID: <480C4947.1070408@googlemail.com>
Shannon wrote:
> Benjamin Hawkes-Lewis wrote:
>>
>> I think you've misunderstand Simon's suggestion, which was:
>>
>> <p>Rating: <img src=1 alt=3/5><img src=1 alt><img src=1 alt><img
>>    src=0 alt><img src=0 alt></p>
>>
>> Note /all/ the img elements have alt attributes, the point is the 
>> alternative text for the group is expressed by the first alt 
>> attribute. It's thus actually the same as the fallback you propose:
>>
> Not the same thing at all. There is no direct association between the 
> elements so there is no way a validator or browser would know the 
> difference between a missing/empty alt and an optional one - thus making 
> ALL use of alt optional as far as formal validation is concerned. If you
> are implying a group can be denoted by being at the same block level or 
> in the correct order in the stream (no intervening images) then I doubt 
> that would work in practice.

In /the fallback you propose/ there is no "direct association" between 
the images either.

In Simon's example, the first image is given an alt of "3/5". The other 
images are given an alt of "". (I'm not sure how the syntax Simon's 
using fits into http://www.w3.org/html/wg/html5/#attributes1 , but at 
any rate he's not omitting alt.) So this is the same as:

<p>Rating: <img src="1" alt="3/5"><img src="1" alt=""><img src="1" 
alt=""><img
src="0" alt=""><img src="0" alt=""></p>

In this case non-image-rendering user agents should (and, equally 
importantly, will) render:

Rating: 3/5

or something like:

Rating: image 3/5

The information that the images are a group would appear to be of only 
marginal importance in this particular example. I can think of cases 
where it might be important however: for example, if a content image 
like a photo or a diagram were sliced up for some reason and the user 
wanted to copy it elsewhere. The case of Google's logo, described 
earlier in the thread, is possibly an example of this.

But whether we need a mechanism for denoting differing img elements 
combine to form a single image is a very different question from whether 
alt should be optional or required. You seem to be conflating them.

--
Benjamin Hawkes-Lewis
Received on Monday, 21 April 2008 00:59:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:02 UTC