W3C Web Accessibility Initiative


This page contains material related to a presentation at the Web Accessibility Best Practices Evaluation Training in Paris, France in July 2004. It is not intended to stand-alone; rather, it is primarily provided as reference material for participants in the training.

Scope of Training and Materials: This one-day training focused on select topics that were particularly suited to the circumstances of this specific hands-on training session. It did not to cover all aspects of evaluating Web accessibility, and did not cover all Web Content Accessibility Guidelines (WCAG) 1.0 checkpoints.
No Endorsement or Recommendation of Evaluation Tools: W3C/WAI does not endorse Web accessibility evaluation tools and does not recommend one tool over another. Some tools were listed, demonstrated, and used in activities in this training. Mention of a specific tool does not imply endorsement nor recommendation. WAI does provide a comprehensive list of Evaluation, Repair, and Transformation Tools for Web Content Accessibility.


Evaluating Forms

Shadi Abou-Zahra, W3C/WAI

Last updated: 25 July 2004

Example of an Inaccessible Form: Pizza Ingredients

Warning: to demonstrate an example of some accessibility issues in HTML Forms, the following content intentionally has accessibility errors.

Please choose the ingedients on your Pizza:

Tomatoes   Cheese   Olives  
     
         

Pizza Ingredients: Incorrect Code

<tr>
  <td width="28%" align="center">Tomatoes</td>
  <td width="5%">&nbsp;</td>
  <td width="28%" align="center">Cheese</td>
  <td width="5%">&nbsp;</td>
  <td width="28%" align="center">Olives</td>
  <td width="6%">&nbsp;</td>
</tr>
<tr>
  <td align="center">
    <input type="Checkbox" value="tomatoes" />
  </td>
  <td>&nbsp;</td>
  <td align="center">
    <input type="Checkbox" value="cheese" />
  </td>
  <td>&nbsp;</td>
  <td align="center">
    <input type="Checkbox" value="olives" />
  </td>
  <td>&nbsp;</td>
</tr>

Pizza Ingredients: Accessibility Issues

Pizza Ingredients: Corrected Code

<tr>
  <td width="28%" align="center">
    <label for="ingredient1">Tomatoes</label><br />
    <input type="Checkbox" id="ingredient1" value="tomatoes" />
  </td>
  <td width="28%" align="center">
    <label for="ingredient2">Cheese</label><br />
    <input type="Checkbox" id="ingredient2" value="cheese" />
  </td>
  <td width="28%" align="center">
    <label for="ingredient3">Olives</label><br />
    <input type="Checkbox" id="ingredient3" value="olives" />
  </td>
  <td width="6%">&nbsp;</td>
</tr>

Example of an Accessible Form: Pizza Ingredients

Please choose the ingedients on your Pizza:




 

Step 2 of 5

Example of an Inaccessible Form: Quick Links

Warning: to demonstrate an example of some accessibility issues in HTML Forms, the following content intentionally has accessibility errors.

Quick Links: Incorrect Code

<script language="JavaScript" type="text/javascript">
function doSubmit() {
  ...
  if(document.quick.link.value == 'WAI') {
    document.location.href = "http://www.w3.org/WAI/"
  ...
</script>
<form name="quick" action="#">
  <select name="link" onchange="doSubmit();">
  ...
    <option value="WAI">Web Accessibility Initiative (WAI)</option>
    ...

Quick Links: Accessibility Issues

Quick Links: Corrected Code

<script language="JavaScript" type="text/javascript">
function doSubmit() {
  ...
  document.quick.submit();
  ...
</script>
<form name="quick" action="script.cgi" method="post">
  <select name="link">
  ...
    <option value="WAI" onclick="doSubmit();">Web Accessibility Initiative (WAI)</option>
    ...

Example of an Accessible Form: Quick Links

Further Relevant Checkpoints