W3C home > Mailing lists > Public > public-comments-wcag20@w3.org > July 2010

WCAG2 Techniques draft: About H71: Use of fieldset/legend

From: Sailesh Panchang <spanchang02@yahoo.com>
Date: Sun, 11 Jul 2010 16:04:43 -0700 (PDT)
Message-ID: <123287.30561.qm@web111722.mail.gq1.yahoo.com>
To: public-comments-wcag20@w3.org
Hello Editorial Committee,
About H71: Use of fieldset/legend:
Two points:
1. Another situation where fieldset-legend  is   highly recommended is where form controls have identical labels. For example:
First applicant: first name, last name, Home address, phone#
Second applicant:  first name, last name, home address, phone#
In this case, “First applicant” and “Second applicant” should be marked up as LEGEND and separate FIELDSET should be used for each group of fields. 
The example code that follows demonstrates this. The example also nests fieldsets for address and phone# fields.
Suggestion: Include a user agent note stating that assistive technology support for  nested fieldsets is spotty / absent. WinEyes only indicates beginning and end of fieldsets but this may not help users who do not understand the HTML term and is not too useful as one navigates in forms mode. JAWS announces only one legend- the nearest one for a field. 
Secondly multiple sets of borders around nested fieldsets may not be agreeable to all developers and interface designers. 
In some situations combining use of fieldset - legend with heading (h<n>) tags may be more appealing. This can effectively  convey info and relationships and help avoid fieldset nesting in some cases.
2. Question: Not sure how fieldset nesting should be rendered by AT. Typically screen reader (JAWS) for instance reads the legend and then the label for the control. So when fieldsets are nested, should AT render two legend-texts + the label?
 Example for fieldset-legend with fieldset nesting (note fieldset nesting is not AT-supported):

<form action="http://example.com/adduser" method="post">
<legend>First applicant:</legend>

<label for="fname1">First name:</label>
<input type="text" id="fname1" name="fname1" size="20" />
<label for="lname1">Last name:</label>
<input type="text" id="lname1" name="lname1" size="20" />
<fieldset><legend>Home Address:</legend><br />
<label for="addr1">Street 
name, house#</label>
<input type="text" id="addr1" name="addr1" />
<label for="city_zip1">City, State, Zip</label>
<input type="text" id="city_zip1" name="city_zip1" />
<fieldset><legend>Phone number</legend>
<input type="text" title="- Area code:" size="3" />
<input type="text" title="-remaining digits (3 + 4:" size="8" />
<legend>Second applicant:</legend>
<label for="fname2">First name:</label>
<input type="text" id="fname2" name="fname2" size="20" />
<label for="lname2">Last name:</label>
<input type="text" id="lname2" name="lname2" size="20" />
<fieldset><legend>Home Address:</legend><br /> 
<label for="addr2">Street 
name, house#</label>
<input type="text" id="addr2" name="addr2" />
<label for="city_zip2">City, State, Zip</label>
<input type="text" id="city_zip2" name="city_zip2" />

<fieldset><legend>Phone number</legend>
<input type="text" title="- Area code:" size="3" />
<input type="text" title="-remaining digits (3 + 4:" size="8" />

-	- -
-	 - - 

Thank  you.
Sailesh Panchang (MS, ASQ-CSQE)
Centreville VA 20120
Tel 571-344-1765
Accessibility Services Lead at www.deque.com

Received on Sunday, 11 July 2010 23:05:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:11:13 UTC