WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: "alt" text sizing?!

for

From: Ian.Lloyd@nationwide.co.uk
Date: Aug 16, 2002 1:19AM


-----BEGIN PGP SIGNED MESSAGE-----

********************************************************************
The contents of this email are intended exclusively for the
addressee. If you are not the addressee you must not read
use or disclose the email contents ; you should notify us
immediately [ by clicking "Reply" ] and delete this email.

Nationwide monitors e-mails to ensure its systems operate
effectively and to minimise the risk of viruses. Whilst it has
taken reasonable steps to scan this email, it does not
accept liability for any virus that may be contained in it.
********************************************************************

Actually, there is something you can do regarding alt text, but it will only
be supported by browsers with good CSS level 2 - so that's not many of them
(but it does work in Netscape 6 and Mozilla 1). Anyway, here's what you can
do:

I've posted about this in my personal blog at www.ian-lloyd.com, but here's
a copy of it for you here:

- ------------------------------------------
"Now that got me thinking. As far as I know, there's no way of changing the
display of the tooltip text when you hover over the image, other than
directly within Windows (can't vouch for Mac) - and that would apply to all
tooltips, not specific images.

You could, of course, devise some kind of DHTML solution whereby you could
call a function that displays the text in a new absolutely positioned
floating div, but that's a bit kludgy.

My argument, though is that if the image is present, there's no need for the
tooltip. Netscape 6 and Mozilla agree - no tooltip appears if the image is
present. After all, why describe the image if the image describes itself?
Also, assuming that the person browsing is visually imparied, they are more
likely to have set Windows to display bigger tooltips anyway.

Nevertheless, there is a solution to the problem raised, or at least
similar. You can change the attributes of the alt text for missing images.
So, for Netscape 6/Mozilla 1 you can use a CSS level 2 property to affect
the appearance of the font when images are either disabled or missing.


Here's the code:

<style>
img[alt]
{
font-size:large;
color:#000066;
}
</style>


Now try dropping that in to a web page, then break the image src path to
give a broken image in Netscape 6/Mozilla 1. You'll see big green text where
normally you'd expect small black text. Alternatively, if you're running
either of those browsers now, you should see the effect here:

Although the majority of browsers don't support it now, they surely will at
some point - so put it in your CSS and wait for it to magically switch on! "


- ------------------------------------------

Hope this is useful


> Ian Lloyd, Electronic Channels
> Nationwide Building Society
>
> |||
> (o o)
> +-------ooO--(_)--Ooo---------+
> | <EMAIL REMOVED> |
> | tel: 01793-655260 |
> | fax: 01793-656368 |
> +-----------------------------+
>


- -----Original Message-----
From: <EMAIL REMOVED> [mailto: <EMAIL REMOVED> ]
Sent: 15 August 2002 21:19
To: <EMAIL REMOVED>
Subject: "alt" text sizing?!


Hi, I had the following question asked of me today... "Can you change the
size of the text in which that the alt-text appears?" i.e. if you assign
alt text to an IMG, and you hover over the image and view the text, is there
ANY other way to increase the size of this text!? i.e. style sheets, etc.

Anyone who can help, pls email me or the list.


G


- ----
To subscribe, unsubscribe, or view list archives, visit
http://www.webaim.org/discussion/



-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.1.1 (C) 1997 Pretty Good Privacy, Inc.

iQEVAwUBPVyyfW4wJNdvwuyFAQH9Xwf+OQZKPDVHvu8URpQSkRwm1+1GjR0qWU3V
1hdsAI/aUdzqlEqRwQZHI35TTgqsick+i2cMF8exrURnVV6JcIO/Us08bLksujnH
8OmVTuwu7rcijvpsYw5l1d7OdnpBQ6/brgQiwcfdX5YbiX+aUrqX2N2WuabfyASm
cUk2xJt+rT2fmAHA0XTg+M0yOop2NJmqpePMl5m5EJFj9Q3fbHES2yDiu6ybLjlV
lp3ZDY+73UlRcsuqHHECDQ3uapOpMhMzSLFD2qQuumxV+Q4OqTKAmpCHmN5eH3d7
wqqfAGawPfIf+0rv054S9GZ9HmW0OZHHZJDqC8aBuGkgkX2JraxJeA==Sd7X
-----END PGP SIGNATURE-----


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/