[thelist] Accessibility, alt, and title

David Dorward evolt at david.us-lot.org
Fri Apr 16 14:22:52 CDT 2004

On Fri, 2004-04-16 at 19:48, Tom Dell'Aringa wrote:
> We're finishing up a big redesign of a site and I have a bit of a
> snag. I'm all for accessibility and I want to do things right. So
> here's the problem: The browsers handle what displays in the "tip"
> when you mouse over an image with a HREF.
> Test Case:
> You have this <a href="foo" title="Click Me!"><img ... alt="Man
> laying on grass" /></a>

That sounds like rather bad alt text. If you didn't have the image and
had to use text, would you really have:

<a href="foo"Man laying on grass</a>



> In Gecko based browsers you will see the title -> "Click Me!"
> In IE5-6 you will see the alt text -> "Man laying on grass"

> Now, if I remove the TITLE - then NOTHING shows up in Gecko.

This is normal. The alt attribute is a _replacement_ for the image, not
advisory information about it.

IE's rendering of it as a tooltip is either a bug or an accessibility
feature depending on who you listen to.

> The issue is the "folks in charge" want an informational message to
> show up in the tip

That sounds like a job for the title attribute, which is there for
advisory information.

>  - like "click me"

Bad idea. 

1. Users might not click the link to activate it. 

2. <a> means click here and browsers indicate that it is a link using a
number of techniques.

>  or "special offer blah blah".

> But that can seeminly only be accomplished in IE - the dominant
> browser and the one they really care about - by *improperly* using
> the ALT tag. 
> Does anyone know of a workaround here or do I just abuse the ALT tag
> and the Gecko users get nothing?

What's to stop you abusing alt and using title?

Anyway, I suspect the issue can be resolved by using alt correctly then
using title on the _image_ (since title trumps alt for tooltips on
images in MSIE)

David Dorward       <http://blog.dorward.me.uk/>   <http://dorward.me.uk/>

More information about the thelist mailing list