WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Graphics and Captions

for

From: Derek Featherstone
Date: Jan 20, 2006 5:15PM


On 1/20/06, Kynn Bartlett wrote:

>Oh, one last note: Do go ahead and use a class, as I've done above,
>to STYLE your captions to look like whatever you want captions to look
>like. Do NOT, however, assume that the use of an arbitrary class,
>even one with a name like "caption" or "imageandcaption", is imparting
>any sort of significant SEMANTIC or SYNTACTIC meaning when you use it.
> It's not. The class attribute should be considered as presentational
>markup and not used to convey anything beyond appearance.

It is true that the most popular use for the class attribute happens to
be for style sheet hooks. However, there is *nothing* that says that is
all it can be used for.

"The class attribute... assigns one or more class names to an element;
the element may be said to belong to these classes. A class name may be
shared by several element instances. The class attribute has several
roles in HTML:

* As a style sheet selector (when an author wishes to assign style
information to a set of elements).
* For general purpose processing by user agents."

Source: <http://www.w3.org/TR/html4/struct/global.html#adef-class>;

I'm not saying that we should assume that there is any semantic meaning
behind class names - currently there isn't a lot save for the work being
done with microformats. There is nothing saying that we can't establish
some and use the class attribute for things beyond presentational hooks.
And doing so might actually be a way to enhance the accessibility of the
web sites and applications we build.

I do agree that we need a richer set of elements than what is currently
available to us in HTML, but why wait?

Cheers,
Derek.
--
Derek Featherstone <EMAIL REMOVED>
tel: 613-599-9784 1-866-932-4878 (toll-free in North America)
Web Development: http://www.furtherahead.com
Personal: http://www.boxofchocolates.ca