WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: alt text and captions

for

From: Dierickx, Len
Date: Feb 10, 2004 7:11AM


Dear,

Most of the attributes can be shown with CSS2 in Opera, like alt attributes
for images but access keys as well.
Title attributes for abbreviations even the language in HTML tag.
Opera provides a user stylesheet where these options are used. (User mode >
Accessibility lay-out).

>The *content* isn't in the CSS; it's in the HTML as an attribute of the
image.
This is true for the img example but CSS2 provides a possibility to add text
using rules in the stylesheet like this:

A:after{content:" Provide a meaningful title.";}

The content is in the CSS file.
This can be useful but I would prefer that the content remains in the HTML
file because stylesheets can be disabled.
That way the content would never reach the HTML file and would not be
accessible for text browsers.

I use both techniques, revealing attributes and adding content via the
stylesheet, for showing accessibility problems with a webpage. I created a
testing style sheet with these CSS2 and CSS3 possibilities.
You can find it at http://www.none.be/css/myAccessibility.css
It shows several Alt and Title attributes, testing for nested tables and
several other things.
Please note that this will only work with Opera7 or Mozilla1.6.
If you don't know how to add a userstylesheet, check out the css-wicki page
about Opera userstylesheets.
http://css-discuss.incutio.com/?page=OperaUserStylesheets

--
Kind regards,
Len Dierickx
http://www.none.be


-----Original Message-----
From: <EMAIL REMOVED>
[mailto: <EMAIL REMOVED> ]On Behalf Of Tim Beadle
Sent: dinsdag 10 februari 2004 10:52
To: <EMAIL REMOVED>
Subject: Re: alt text and captions


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/


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