Link to USGS home page
Internal USGS Access Only

Building an Accessible Form

Associate Prompts with Form Fields
Your can use either of the following methods:
Use FIELDSET with a LEGEND to group Radio Buttons, or Check Boxes, which have the same NAME
<fieldset>
  <legend>Choose a fish</legend>
  <input id="redFish" type="radio" name="color" value="red">
  <label for="redFish">red fish</label><br>
  <input id="blueFish" type="radio" name="color" value="blue">
  <label for="blueFish">blue fish</label>
</fieldset>

Choose a fish

Note that LABEL and ID tags are still needed, as above. Labels and IDs are case-sensitive.

For mor examples see WebAim's "How to Create Accessible Forms" and Jim Thatcher's Accessible Forms.

slide 38


[up]
"Mastering a Web Site" online course
Created and maintained by Lorna Schmid and David Boldt.
http://water.usgs.gov/usgs/training/webmaster/accessible_form.html    
Last modified: Mon Nov 7 11:05:35 EST 2005