Afficher un message
Vieux 16/03/2008, 17h30   #4
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can I set a different style for <a title="" /> or <img title="" />?

On Sun, 16 Mar 2008 16:36:11 +0100, Jukka K. Korpela <jkorpela@cs.tut.fi>
wrote:

> Scripsit Lorenzo De Tomasi:
>
>> In <a href="http://index.html" title="Go to the homepage">Homepage</a>
>> or in
>> <img src="paris.jpg" alt="Two children running in front of the Eiffel
>> tower" title="Paris, 2008">,
>> using only css, I would like to set a different text-color or
>> background-color for the 'title box' that appears when i do a rollover
>> on the link or the image (Firefox default is a black text on a yellow
>> background box).
>>
>> Is it possible?

>
> No, it isn't, since the "tooltip text" does not even exist in CSS terms.
> You can refer to the text as text in CSS rules in certain ways but you
> cannot describe its rendering in CSS, since there need not be any
> default rendering for it and if there is, it cannot be referred to in
> CSS.
>
> Before starting to consider some special techniques that may create a
> "mouseovet effect" in addition to and independently of browsers'
> eventual "tooltip texts", consider whether it would be useful and
> whether it would be worth the effort. Note that the costs include
> potential user confusion. Anything that _looks_ like a popup window is
> suspicious to many people, and things that pop up and out may confuse a
> screen reader or a user's mind.
>
> For example, "Go to the homepage" is just a nuisance and doesn't resolve
> the issue what the link really points to. Instead of "Homepage", use a
> descriptive link text like the company's name (followed by " main page",
> if pointy-haired bosses insist on your being pointlessly verbose). Thus,
> the need for any "mouseover effect" vanishes in a puff of logic.
>
> Similarly, title="Paris, 2008" is pointless. If the information matters,
> put it below the image as normal text, though perhaps styled to be
> different from copy text, centered, etc., to look like a caption or
> description (see http://www.cs.tut.fi/~jkorpela/www/captions.html ). And
> if it does not matter, leave it out. The alt="..." attribute in <img> is
> even more pointless. Who is it for? Traditionally, alt attributes have
> been described as ing blind people who do not see images. Would you
> like to listen to (or read with your fingertips) babbling like "Two
> children running in front of the Eiffel tower"?


Might I object to your last statement? There have been cases when I was
blessed with a VERY slow internet connection (traveling with a laptop,
with no other option then a mobile phone on a very slow network to get
online). In those cases, I usually don't let the images download at all,I
do see their ALT texts though, and the ALT text lets me clearly see what
images are of importance to the job at hand, and which aren't (images
might be just an illustration of a story to pretty it up, in which case
they usually aren't of any importance, they may however show schematics of
graphs, which could be vital). Based on those alt descriptions, I can
choose to download/show the image. More importantly: if someone was clumsy
enough to choose images for navigation, a decent ALT text let's me clearly
see what part of a website the image is supposed to link. Even if I did
try to download the images at low speeds like that, I'd like to be able to
see what content is about instead of endlessly waiting for everything to
load before a (part of a) page makes sense.

Ofcourse, when talking about the visually impaired, the first use
mentioned will be of no importance to them, as they will never be able to
see the image. The second one though could be vital, especially since some
trend seems to be to have big flashy 'button' style links in webpages to
important parts nowadays.

I'm in no place to comment on current state of affairs on the net for the
visually impaired, as my eyesight is good enough and I have never had the
need to explore current programs/applications like screenreaders. I do
however make sure my documents are logical, readable, and usable without
any styling and images applied where possible.
--
Rik Wasmus
  Réponse avec citation
 
Page generated in 0,06104 seconds with 9 queries