WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Explicit Link Between Radio Buttons and "Question" Label?

for

From: Paul Bohman
Date: Feb 12, 2003 12:33PM


If you know how to work with CSS, then you can make your fieldsets and
legends do anything that you want them to, visually, without losing the
structural markup.

You can supress the visual box around fieldsets for example with this CSS
coding:

<fieldset style="border:none">

You can also change the color, thickness, and look of the border (e.g.
solid, dotted, or dashed):

<fieldset style="border:#000000 2px solid">

If your problems arise because of complex table layouts that don't allow you
to wrap the input elements in a fieldset, I would suggest that the table
layout is the problem rather than the fieldset. Simplify the table layout
and mark it up with the fieldset.

This really is the best way to group form controls of this type. In fact,
this convention holds true off of the Web as well (and was first invented in
non-Web formats). In my Internet Explorer 6.0 Internet Options dialogue box
on Windows XP, for example, I can see that there is a fieldset around the
"Home Page" options, around the "Temporary Internet files" options, and
around the "History" options.

For an even more obvious use of the fieldset convention, look at the
preferences dialogue box in the Opera browser (File > Preferences) You'll
see that all the radio buttons and checkboxes in all of the categories are
grouped in fieldsets (especially look at file > preferences >
accessibility).

The Fieldset convention has been around for a long time in programming, and,
as of HTML 4.0, you can do the same thing on the Web. So the answer to your
question is that the method (fieldset) already exists and it really is the
correct and official standard.

Paul Bohman
Technology Coordinator
WebAIM (Web Accessibility in Mind)
www.webaim.org
Center for Persons with Disabilities
www.cpd.usu.edu
Utah State University
www.usu.edu



-----Original Message-----
From: Hoffman, David [mailto: <EMAIL REMOVED> ]
Sent: Wednesday, February 12, 2003 11:58 AM
To: ' <EMAIL REMOVED> '
Subject: RE: Explicit Link Between Radio Buttons and "Question" Label?


I have previously experimented with using fieldset and legend as suggested.
In addition to the issues listed below by Lori, legend has some very rigid
requirements, which interfered with the desired HTML coding on complex
forms. I am hoping for either an alternative solution or some kind of effort
to ensure that the standards directly address the issue in the future.

Thanks,
David





----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/