WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: alt text and captions

for

From: Tim Beadle
Date: Feb 10, 2004 2:59AM


On Tue, Feb 10, 2004 at 10:02:49AM +0100, Giorgio Brajnik wrote:
> I don't think it is a good idea to put this kind of content into css
> rather than as an attribute in HTML. This kind of content is an
> essential part of the page (it's not just style) and therefore it has
> to be reachable (visible or audible) in the same way the rest is. If you
> put it in CSS then all the devices that can't read CSS won't be able
> to render it (for example lynx, Blazer on PALM OS, GoogleBot, etc.).

The *content* isn't in the CSS; it's in the HTML as an attribute of the image.
It's the display of the content that's being handled by CSS, which IMHO is
just one of the many great things that CSS can do. Lynx et al will render the
alt text as normal.

Another example is for displaying blockquotes, but this time using javascript:
http://www.1976design.com/blog/archive/2003/11/10/updates/

Also, displaying image captions using js:
http://www.1976design.com/blog/archive/2003/11/25/captions/

*None* of these methods rely on javascript for their content; they are just
progressive enhancement methods on top of the structural markup. More capable
user agents get the stuff they can handle, while less-capable ones get the
HTML.

A great article on progressive enhancement:
"Keep it Simple: The Behavior Layer" by Peter-Paul Koch
[http://digital-web.com/columns/keepitsimple/keepitsimple_2004-01.shtml]

Cheers,

Tim
--
"Internet Explorer is like a box of chocolates. You never know what you're
gonna get." -- Sjors


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