WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Alternatives to LEGEND for a radio button?

for

From: Jukka K. Korpela
Date: Sep 5, 2009 11:15AM


Geof Collis wrote:

> First off I'm not sure who decided that I as a screen reader need the
> "legend" tag.

I don't know, but you seem to be complaining about bad implementations
rather than specifications or pages.

> When I have used it in the past I found it annoying to
> be subjected to the same phrase in front of every option, be it radio
> button or checkbox,

The legend element is heading-like and specifies a common "heading" for a
set of fields that belong together. An author could use a heading element
like h2 or just use text before the fields, but legend is specifically
related to grouping fields.

If a screen reader repeats the legend for every field, then that's a bad
idea, though it would be useful to give a user an optional access to legend.
In a long sequence of fields, the user might loose track of what the
question was.

> for example
>
> what is your favourite colour checkbox not checked blue
> what is your favourite colour checkbox not checked red

That's bad, at least a default behavior. It would be equally bad, and rather
comparable, if a browser repeated the text in an h2 heading before each
paragraph that follows it.

> I just want the form to be a form, not something cooked up to make
> it look good for the sighted or pass some suspect guideline and I
> want the least amount of chatter from JAWS.

If this is a JAWS problem, then JAWS, or maybe settings, need fixing. After
all, more than 99% of web users are not using JAWS, so it would be
disproportionate to remove a reasonably designed element from HTML
specifications or stop using it. Besides, authors won't stop using it and
won't modify existing pages and software to remove legend and fieldset
elements.

> I dont want my form
> broken up by headings either. Then again maybe I'm asking to much.

You are, since the "headings" are in this case important texts that indicate
what the question is or what topic some questions relate to. They are not
supposed break a form up any more than subheadings break a document -
rather, they help in grouping things and giving a group an understandable
identity.

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