Re: Investigating the proposed alt attribute recommendations in HTML 5

On Aug 29, 2007, at 4:45 PM, Leif Halvard Silli wrote:

> 2007-08-30 00:03:17 +0200 Maciej Stachowiak <mjs@apple.com> wrote:
>> On Aug 29, 2007, at 11:48 AM, Steven Faulkner wrote:
>
>>> Investigating the proposed alt attribute recommendations in HTML 5 -
>>> http://www.paciellogroup.com/resources/articles/altinhtml5.html
>>
>> It looks like the flickr page
>
> [ Located at <http://www.flickr.com/photos/tags/sleepingcats/> ]
>
>> you tested is a search, which doesn't  include
>> the title or caption.
>
> This is not true. Here is an analysis of this page and the  
> alternative page you proposed to test.
>
> The above page include TITLE= on the images. Howver, I suppose what  
> you meant to say is that the Title= attribte isn't in the IMG  
> element itself, but only the surrounding A-element.

No, when I said title I meant in the ordinary english sense, not the  
markup sense - there aren't title headers in normal always-visible  
text above the images as in a normal gallery page.

> However, «If this attribute is omitted from an element, then it  
> implies that the title attribute of the nearest ancestor with a  
> title attribute set is also relevant to this element.» (HTML5 on the  
> use of TITLE= [1])

I'm not sure if it would be appropriate for screen readers to use an  
ancestor title to identify the image. Maybe in this special case where  
there's no other content inside the ancestor. Or perhaps they should  
read the title of a link that has no text content.

>> What about a page like this (I found it  from the
>> example you used), where the titles are included, and are   
>> duplicated by the
>> alt text:
>>
>> http://www.flickr.com/photos/11994078@N04/
>
> That is a questionable test page in this context. Because, if you  
> had read the source better, you would have seen that it involves  
> testing many other things than simply the effect of how one use the  
> ALT attribute:
>
> (1) The IMG tags on that page does not have TITLE=. Instead it has  
> captions.
> (2) BUT, the captions are placed inside a H4-element, inside its own  
> TD-cell. Whereas the the image is placed in the TD cell just below  
> this TD-cell, in the same column.
> (3) The TD with the IMG does not have a HEADERS= attribute which  
> shows what its caption cell is. I have now clue how the H4-element  
> is linked to the image cell ...
>
> May be the captions should have been in TH-cells ... Or, the best  
> would probably have been if the IMG and the caption was placed in  
> the same cell (if TABLE should be used at all).

Good point. Suppose however there were good markup that associated the  
header with the image. In that case, is it helpful to have alt text  
that duplicates the text in the header?

>> Based on what you said about JAWS, it sounds like alt="" might  
>> give  the best
>> results in that version of JAWS.
>
> I don't think so.

I meant because it would already read the exact same text from the  
title in the visible text (I'm using title to refer to the large  
header text above and caption to refer to the smaller text below,  
perhaps there is better terminology). It seems like reading the text  
twice is unhelpful. But it may be that the markup does not make it  
easy to make the assiciation.

> If we assume that JAWS can/could establish the relationship between  
> the caption and the image by applying its heuristics, then I think  
> these images could be described as buttons - as they are wrapped in  
> the A-element and because their title is given in the caption. The  
> relavant section in HTML5 is  «Icons: a short phrase or label with  
> an alternative graphical representation» [2]. As there is no other  
> text inside the A-element, the IMG must have alt text. But it should  
> have been only a short button-text.

Although the image is clickable, I don't think icon is the intended  
semantic. But for comparison, how about this individual image page  
that has a visible caption and where the image is not a link: <http://www.flickr.com/photos/11994078@N04/1237874307/ 
 >. In this case the page uses empty alt.

> The ALT could have been empty if the caption had been kept inside  
> the A-element - together with the IMG. Then we could have omitted  
> the alt-text, according to HTML5: «In some cases, the icon is  
> supplemental to a text label conveying the same meaning. In those  
> cases, the alt attribute must be present but must be empty.»
>
> But it also depends on how the page is intended to be read. All  
> images are buttons. But many readers would not be interested in  
> clicking on those "buttons" - they would be content with looking at  
> this page alone. If that is the intention, then the images should  
> have had full replacement texts, which described the content even  
> better than what the captions do.

Sure, that would be nice. But if such text is unavailable, we need to  
determine which of the following is best:

  - alt attribute that duplicates the header
  - empty alt attribute
  - no alt attribute

In general it seems that alt text which duplicates other text next to  
the image would be unhelpful, but in this case the page uses a layout  
table in an inaccessible way (no proper header/cell association) so it  
might be hard to associate the text with the image.

>
>
> [1] <http://www.whatwg.org/specs/web-apps/current-work/multipage/section-global.html#title 
> >
> [2] <http://www.whatwg.org/specs/web-apps/current-work/multipage/section-embedded.html#alt 
> >
> -- 
> leif halvard silli
>

Received on Thursday, 30 August 2007 00:38:51 UTC