W3C home > Mailing lists > Public > public-html@w3.org > September 2007

More about <alt> (was Re: Investigating the proposed alt attribute recommendations in HTML 5)

From: Sander Tekelenburg <st@isoc.nl>
Date: Wed, 5 Sep 2007 04:10:07 +0200
Message-Id: <p06240688c303bb702138@[]>
To: public-html@w3.org

At 01:09 +0200 UTC, on 2007-09-05, Leif Halvard Silli wrote:

> 2007-09-04 20:22:04 +0200 Sander Tekelenburg <st@isoc.nl>:
>> At 13:30 +0200 UTC, on 2007-09-04, Leif Halvard Silli:


> With @ALT, we can do both a @ALT text and a @LONGDESC for the same IMG.

Well, my impression is that we can, only because both @alt and @longdesc
exist... Why exactly do they exist at all? For one, because <img> is an empty
element. For another, because it seems that at some point in time it was
realised that @alt only works for short equivalents, and doesn't allow any
markup. No such problems exist with <object> (or the suggested <picture>). So
a thought very much related to <alt> is that it would be good to give authors
somethingbetter than <img>, like a fixed <object> or possibly a new <picture>.

Considering all that, is there really a need for both a short and a long
equivalent? And if so, is there a need for them to be indicated semantically
as such? (Remember that until now, HTML specs haven't made any such claim.
@longdesc has only been defined for <img>, <frame> and <iframe>.)

So, in that context, and thinking outside of the <img> box: is @longdesc
really needed?

> But with <ALT> that would be e.g. somethingn like this, I guess:
> <alt for='img' ><a href='longdesc'>My Cat</a></alt>

Well, authors still *could* provide long and short textual equivalents. They
would only not have a way to mark them up in a way that non-humans would
recognise them as such:

<img id="blah" src="home.png">
<!-- anything or nothing -->
<alt for="blah" title="textual equivalent" type="text/html"><p>Blah</p></alt>
<alt for="blah" title="long description"
type="text/html>>h1>Blah</h1><p>Blah, blah.</p><h2>More</h2><p>Blah, blah,

> In general, with <ALT> it would be simple to think of how the alternative
>content could be displayed in parallel with e.g. an IMG ... I mean, the CSS
>selector would be super simple: IMG:hover+alt{}.

Well, only if <alt> can be expected to immediately folllow <img>.

> Plus one would get to see the img @TITLE via tool tip for free Š ;-)

Well, that in itself should be solved anyway, now that the spec says that UA
must present @alt and @title differently.

> But, with <ALT>, all images would in fact lack @ALT text - so if we have
> 	<a href="ref"><img src="Inside_A"></a>
> 	<alt>Outside_A</alt>
> Š then there would be no text link in text mode. Of course, one could add
>@FOR, but I think this would be one case where many would err.

@for is required on <alt>, so a validator would flag this.

Sander Tekelenburg
The Web Repair Initiative: <http://webrepair.org/>
Received on Wednesday, 5 September 2007 02:11:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:25:12 UTC