Form Elements
WCAG 1.3.1 Info and Relationships
WCAG 3.3.2 Labels and Instructions
WCAG 4.1.2 Name, Role, Value

A label must be programmatically associated with a form element. All user interface components, e.g. form elements, links, etc, the name, and role can be programmatically determined. States, properties and values that can be set bye the user can be programmatically set and user agents (including assitive technology) are notified of these changes.

How To Assess

Examples of Code that Violates and Fails

 <h3>Donut Selection</h3>

<p>Choose the type of donut(s) you would like then select 
   the "purchase donuts" button.</p>

<form action="http://example.com/donut" method="post">
<p>
<label>First name:</label> 
<input type="text" name="firstname" /><br />
  <input type="radio" name="flavor" value="chocolate" />
    <label>Chocolate</label><br/>
  <input type="radio" name="flavor" value="cream"/>
    <label>Cream Filled</label><br/>
  <input type="radio" name="flavor" value="honey"/>
    <label>Honey Glazed</label><br/>
  <input type="submit" value="Purchase Donuts"/>
</p>
</form>

Donut Selection

Choose the type of donut(s) you would like then select the "purchase donuts" button.





WebAIM - JAWS Practice: Forms

Citylights Survey Before

Examples of Code that Satisfies WCAG (WCAG Techniques)

<form action="http://example.com/donut" method="post">
<p>
<label for="firstname">First name:</label>
<input type="text" name="firstname" id="firstname" /><br />
<fieldset>
<legend>Donut Flavors</legend>
<input type="radio" name="flavor" id="choc" value="chocolate" />
<label for="choc">Chocolate</label><br/>
<input type="radio" name="flavor" id="cream" value="cream"/>
<label for="cream">Cream Filled</label><br/>
<input type="radio" name="flavor" id="honey" value="honey"/>
<label for="honey">Honey Glazed</label><br/>
</fieldset>
<input type="submit" value="Purchase Donuts"/>
</p>
</form>

Donut Selection

Choose the type of donut(s) you would like then select the "purchase donuts" button.


Donut Flavors


WebAIM - JAWS Practice: Forms

Citylights Survey After

Notes

Home