internal draft. get the real thing from www.w3.org/WAI/eval/preliminary

Forms and error messages

[Draft update of 6/2/13 by Sharron and Anna Belle. Reorganized to parallel multimedia structure. Illustrations deleted. Content edited per meeting of 5/31. ]

Successful web interactions often depend on accurate presentation of form fields and controls. Someone who does not see the page needs to know what information is being requested in which input field and other very specific information about how to use the form. Someone who relies on the keyboard for navigation must be able to enter information and operate controls.

To meet accessibility requirements, forms must therefore be clear, navigable, and logical. Even simple forms, such as log-in and search boxes, can be problematic if not created and coded correctly.

What to do:

Find forms

If there are forms on the page you are checking, use the following steps to verify accessibility.

Form types include:

What to check for:

Keyboard access

Follow the steps above for keyboard access to ensure that all form controls are labeled and keyboard accessible.

Labels

Form labels are the most reliable way to ensure that all users receive clear and accurate information about what the form is for and what specific information is being requested within a particular input field. Even simple forms like Search and Login need labels.

Required fields and other instructions

Some forms are quite simple, such as a search form. Often, however, forms are more complex. For example, certain input fields may designated as being "required" for form validation. Other types of dependencies may also add complexity. In such cases, instructions may be needed. While it is beyond the scope of this Easy Check to completely verify that form instructions meet all accessibility requirements, the following basic assurances can be made.

Submit buttons

Error messages

Enter incorrect data – e.g., incorrectly formatted telephone numbers and email addresses. Submit the form and look for:

Tips

To check forms with IE WAT

  1. Open the web page you are checking.
  2. In the toolbar, select "Structure", then "FieldSet / Labels". Or, with the keyboard: Ctrl+Alt+6, then down arrow key to "FieldSet/Labels", and select.
  3. Verify that each form has a unique associated label id in the HTML. If id's are repeated they may not be available to people using assistive technology.

To check forms with FF toolbar

  1. Open the web page you are checking.
  2. Check that all form fields have associated labels.
    • In the toolbar, select "Forms", then "Outline Form Fields Without Labels". Or, with the keyboard: Alt+T, W, F, O.
  3. Verify that each form has a unique associated label [@@ - is this to complicated in FF?]
    • In the toolbar, select "Forms", then "Display Form Details".
      Or, with the keyboard: Alt+T, W, F, D.
  4. Verify that the submit button has a meaningful value [@@ - is this to complicated in FF?]
    • In the toolbar, select "Forms", then "View Form Information".
      Or, with the keyboard: Alt+T, W, F, V.
    • Check in the 'type' column for "submit" and then check that the value column contains a meaningful value [@@ have I got this right?]

To practice checking Forms with BAD

Access the inaccessible Survey page www.w3.org/WAI/demos/bad/before/survey.html which contains several types of forms.

Notice:

Read the annotations within the inaccessible page for detail about how these forms fail to meet WCAG Success Criteria. Then view the accessible version of the page at www.w3.org/WAI/demos/bad/after/survey.html.

To learn more about forms