WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: IMG with a caption?

for

From: Jukka K. Korpela
Date: Mar 3, 2005 2:04PM


On Thu, 3 Mar 2005, lists38 wrote:

> There is no HTML element or attribute for that, that would make a
> connection between the image and the caption.

That's what he have to live with, unfortunately. But there are many
possible workarounds, see
http://www.cs.tut.fi/~jkorpela/www/captions.html

> The caption element is for tables exclusively.

That's correct, but a single-cell table is one of the workarounds,
and it has the nice feature that you can put the caption text before the
image (hence before the alt text, in non-visual rendering) but visually
position it below the image (the common presentation for image captions),
using . It might be better to read the caption
text before the alt text, since the caption is by its nature often more
explanatory. Especially for content images, we often need to restort to
alt texts that aren't real alternatives but just short descriptions or
names for the image.

> One option would be to nest the image in the same paragraph, at least
> then it has the same element. Setting the image display to block in
> the CSS will show it above the text.

Yes, but authors normally want to make the text appear below the image in
a particular way in visual rendering, and this usually means that you need
some more elaborated markup.

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