WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Legend wrap (or not)

for

From: Jukka K. Korpela
Date: Aug 29, 2007 12:00AM


On Tue, 28 Aug 2007, Stephanie Sullivan wrote:

> I've got a conundrum and I've googled with nothing recent that
> appeared in the results... I thought I'd request the opinion of the
> group here...

Please use normal English punctuation instead of terminating every
sentence in an ellipsis. That will make your messages more accessible.

> My problem enters with the legend. In some browsers, it wraps. In
> some it doesn't.

It's a tricky issue, with various markup and styling and design issues.

But the essential thing, especially from the accessibility point of view,
is this:

If wrapping or non-wrapping matters, it's too long. The legend should be a
short heading-like text, not e.g. a long question. So if it's so long that
it might need to wrap (in a fairly normal canvas), move the text after the
legend element and write new contents for the legend element.

Example:

<legend>How much do you watch television, estimated as an average number
of hours per day, during the last six months?</legend>

would become

<legend>Watching TV</legend>
How much do you watch television? Please estimate this as an average
number of hours per day, during the last six months.

In addition to solving the wrapping problem, this has basically the same
benefits as the use of short descriptive headings.

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