Grossmont Collegeskip navigation
Apply & Enroll Departments Help for Students Find People Online Services Campus Information Student Activities
Web Accessibility - Priority 2

Web Accessibility: Priority 2

Menu

 

 

Web Accessibility: Forms


Associate Form Controls and Labels

Users with visual impairments may not be able to determine which label applies to which form control and therefore will not know what data to enter. Proper positioning of the label helps to avoid this.

For each form control, place its label in a <LABEL>. A label is attached to a specific form control using the FOR attribute. The value of the FOR attribute equals the value of the ID attribute.

For example:

<LABEL FOR="firstname">First Name:
<INPUT type="text" id="firstname" tabindex="1">
</LABEL>

produces the following:



Labels Should Appear After a Radio Button or Checkbox


For example:

<input type="radio" name="button" value="Personal Development" id="dev">
<LABEL FOR="dev">Personal Development</LABEL>

<input type="radio" name="button" value="Management Skills" id="skills">
<LABEL FOR="skills">Management Skills</LABEL>

produces the following:





Labels for Text Fields Appear Before the Text Field


For example:




Labels for Groups of Form Controls Appear Before the Group


For example:
Poway

Sacramento
Make sure that the <LABEL FOR=> is right next to the identifying text as any formatting will not allow this to work properly with assistive computer technology (or some browsers).

Do not forget to close off the label tag with a </LABEL> after the identified text.

As a result of this coding, a screen-reader will report back the "Choose a city:" information whenever the user moves the focus from one radio button to the next radio button. This provides additional feedback in order to move through the form.


Use <OPTGROUP> to Group Lists of Selections


Note: HTML 4.0 does not permit nested <OPTGROUPS>. While a future version may add this capability, it is advisable to create only a single grouping level with this element.

For example:

<FORM action="http://www.grossmont.edu/dsps/access/p2forms.asp" method="post">
<SELECT name="highered">

<OPTION label="0.0" value="0.0" selected>
Choose an institution
</OPTION>

<OPTGROUP label="colleges">
<OPTION label= "0" Value="0">
--COLLEGES--
</OPTION>

<OPTION label="c1" value="c1">
Big Ben College
</OPTION>

<OPTION label="c2" value="c2">
College of Blue River
</OPTION>
</OPTGROUP>

<OPTGROUP label="universities">
<OPTION label="0" value="0">
--UNIVERSITIES--
</OPTION>

<OPTION label="u1" value="u1">
University of the Red Herring
</OPTION>
</OPTGROUP>

</SELECT>
</FORM>


produces...


Use <LEGEND> to label each <FIELDSET>



For example:

Personal information
   




Address