WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: IMG with a caption?

for

From: Jukka K. Korpela
Date: Mar 3, 2005 11:13PM


On Thu, 3 Mar 2005, mmoore wrote:

> not sure if anyone has suggested this solution yet, sorry if it is a repeat.
>
>
>
> Caption text here
>

It's one of the options, though you should use the correct syntax
(no "px" in HTML attribute values), and it's questionable whether
paragraph markup is best here. Semantically, a caption is seldom
really a paragraph, so would be better. Presentationally,
paragraph elements usually have default top and bottom margin,
so here the image would be separated from its caption, making
it more difficult they they belong together. Although you could
easily remove the top margin using CSS, people with disabilities
may well have disabled CSS support or overridden page style sheets
in favor of a user style sheet designed for the user's needs.
Moreover, you can do nothing practical to prevent speech browsers
from making a short pause before a paragraph if they have been designed
to work that way.

> The alt could be "" if the caption is an appropriate
> description or it could be something complementary.

But that would be rare. If an image has a caption, it is probably a
content image and the caption text just describes what the image is
about, instead of conveying its full message. So the odds are that
it would be better to have the caption read first, giving those
users who have _some_ way of accessing images (maybe the user is
just surfing with images disabled?) a basis for deciding whether to
try to access this particular image.

Unfortunately, there's no way to suppress a caption in non-visual
rendering except by making the caption part of the image (which
creates problems of its own). For example, if your page contains
some article that tells about some meeting and is illustrated
by a photo of the meeting, with a caption, then both the photo
and the caption should probably be omitted in non-visual rendering.
In that case it's probably the least of evils to use a short alt
text like "(photo of the meeting)". Without the caption, we could
use just alt="".

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/