[whatwg] ALT and equivalent representation

On Fri, 18 Apr 2008 20:30:12 +0200, Philip Taylor  
<excors+whatwg at gmail.com> wrote:

> What should happen for 'tracker' images? (i.e. <img
> src="http://evil.google.com/user-track.php?site=97519340" width="1"
> height="1" alt="???">)
> As some examples, Geocities has alt="setstats", someone has
> alt="statystyka", someone has alt="CrawlTrack: free crawlers and
> spiders tracking script for webmaster- SEO script -script gratuit de
> d?tection des robots pour webmaster", etc, and those examples do not
> help users who are seeing the alt text.
>
> Such images are pretty common, and they're not going to go away, so we
> should minimise their harm by saying alt="" is appropriate. None of
> the cases in the spec seem to cover this case yet.

Moreover, such images often use width=0 height=0, but that's invalid per  
HTML5, which seems a bit unhelpful.


> google.com is splitting the image up to fit it in a layout table,
> which is non-conforming HTML5; but there are other more legitimate
> reasons for having several img elements representing a single piece of
> text, and in those cases it seems sensible to put alt="all the text"
> on one image and alt="" on the others. Should HTML5 be changed to
> accept this?

For instance it would be reasonable to use two images -- a filled star and  
an unfilled star -- to represent a rating of something:

    <p>Rating: <img src=1><img src=1><img src=1><img src=0><img src=0></p>

You'd want the text version to be:

    Rating: 3/5

Hence:

    <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>

-- 
Simon Pieters
Opera Software

Received on Saturday, 19 April 2008 04:18:48 UTC