--- On Thu, 5/6/10, Jukka K. Korpela <jkorp...@cs.tut.fi> wrote:

> Another CSS-related issue is that many people have used alt
> attributes to 
> create "tooltips", like annotations on the images. This
> tends to interfere 
> with the proper use of such attributes. Moreover, the
> "tooltips" are 
> rendered in a manner that is immune to everything you say
> in CSS, using 
> system routines. The rendering has many drawbacks, like the
> disappearance of 
> the "tooltip" after some seconds, which is really annoying
> if the text is 
> long and you'd like to read it.
> 
> Therefore, if you want to show "tooltips", it's better to
> do that with CSS 
> (or CSS + JavaScript), e.g. including explanatory text in
> document content, 
> hiding it with CSS, and making it visible in a particular
> position. It's 
> useful then to add title="" (i.e., title attribute with
> empty value), as 
> this will prevent some browsers from displaying the alt
> attribute value as 
> "tooltip".

Actually, the title attribute is the best way of displaying tooltips, IMO. That 
text is available to screenreaders, and is - as you point out - handled by most 
browsers in a fairly consistent way, usually in keeping with the user's OS, so 
the behaviour should be familiar.

The way I handle 'enhanced' tooltips (if required) is with a bit of javascript 
that extracts (and removes) the title value, adds it to the DOM, and then 
styles that new element.

- Bobby
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to