E-mail List Archives

Re: Legend wrap (or not)

for

From: Moore, Michael
Date: Aug 30, 2007 7:30AM


Stephanie Sullivan wrote:

Bingo! I am anti-span (hate adding them in) but sometimes they're
necessary. So far, this works in every browser I can test in (need to
redownload NN to test that one). And to confirm, I've been away from
email today and my friend, Derek Featherstone told me the same thing on
IM tonight. You both win the prize. :)

Mike:

Derek is a great guy, I have known him for a few years. Either Derek or
James Craig were probably my original source for that technique.

Mike:

> The screen reader will announce the legend before the label for every
> form input contained within the fieldset. This can become a usability

> issue, especially with needing to listen to the same question 5 or 6
> times while trying to review the answer choices. Now imagine listening

> to a survey with 50 questions each containing 5 answer choices.
>

Stephanie:

Oh gah. So most of these fieldset/legends contain a couple/few
questions. However, one of them has an ordered list with three items
(each LI in the list has at least one label/input pair, but the third
one contains an unordered list with 7 label/input pairs)... this sounds
like it will read ugly.

And are you saying that BECAUSE I have an ordered list inside my
fieldset, even though this list items don't contain any text outside the
label/input pair, they may not be read? Or am I safe to use lists WITH
labels?

Mike:

Sorry for the confusion, adding the label/input structure to the list
will cause JAWS, Window Eyes, and HPR to read label for the input even
when contained within a list or other any other valid element, I have
not tested with HAL or Super Nova but I would say that the odds are
pretty good that they will work too. The key is the label/input
binding. I always recommend explicit binding using the for and id
attributes.

Stephanie:

So I'm guessing the third item in my ordered list should become a nested
fieldset/legend with the list inside that. (well, depending on your
answer to the above question.)

Mike:

If the third item is not already contained within a label that is
associated with an input, then wrapping it within a fieldset and legend
would get the job done as long as it continues to make sense
structurally. Of course I am probably preaching to the choir here given
your WaSP affiliation.

Mike:
>
> A method that I am currently experimenting with is to place a hidden
> gif within the label for the first input in a set of answers for a
> question.
> The question itself can be contained within a paragraph, list item or
> span element. The alt text for the gif also contains the question.
> This
> is working well using JAWS 6.0, 8.0 and Window Eyes 6.0. The form
> looks normal for visual users and screen reader users only hear the
> question one time unless they are listening to the form outside of
> forms mode.
> Their verbosity settings do not matter. If out of forms mode they
> will hear the question twice for the first input only.
>
> <label for="test"><img src="tiny_clear.gif" width="1" height="1"
> alt="question text here" />Answer Choice 1</label>
>
Stephanie:

Interesting idea. I should shortly have my own set of testers and will
play with this...
Thanks for your input, Michael!
Stef.

Mike:

The biggest problem that I have seen thus far is if images are turned
off, the alt text is displayed by the browser. This can be ugly. I
think that positioning the image off screen will fix the problem unless
images and css are both absent. I have not tested this yet though. I
hate it when the hacks start to get to complicated <grin />

Mike Moore