Rule FORM-8
Each _effective label_ within a page should be unique.

Description

Best Practice Type: Pass/Warning

Each effective label within a page should be unique.

Notes

When additional contextual information exists for a form control, its effective label is constructed from both the additional text and its primary label. When there is no additional information for a form control, its effective label is equivalent to its primary label.

There is one common case in HTML markup where an effective label is created by concatenation of additional text: namely when a form control has an associated fieldset/legend element.

Common case for constructing an effective label of a form control by concatenation of additional text:

For any form control contained in a fieldset element that also contains a legend element, the effective label of the form control consists of the concatenation of the text content of the legend element, followed by a space character separator, followed by the primary label content of the form control.

Primary label content for specific form controls:

  • input[type=“text | password | checkbox | radio | file”], select and textarea
    1. Includes the text content of the associated label element plus any alt attribute values of img elements contained in the label element, inserted in document order (delimited by space characters).
    2. If a label element is not associated with the form control, the title attribute value is used (when present).
  • input[type=“image”]
    1. The alt attribute value.
    2. If the alt attribute is not defined, the title attribute value is used (when present).
  • input[type=“button”]
    1. The value attribute value.
    2. If the value attribute is not defined, the title attribute value is used (when present).
  • button element
    1. Includes the text content of the button element plus any alt attribute values of img elements contained by the button element, inserted in document order (delimited by space characters).
  • input[type=“submit”]
    1. By default the text value “submit” is used.
    2. If the value attribute is defined, its value is used.
    3. If the value attribute is not defined, the title attribute value is used (when present).
  • input[type=“reset”]
    1. By default the text value “reset” is used.
    2. If the value attribute is defined, its value is used.
    3. If the value attribute is not defined, the title attribute value is used (when present).

Markup

input[type=text|password|radio|checkbox|file] (HTML4)

textarea (HTML4)

select (HTML4)

input[title] (HTML4)

label (HTML4)

fieldset/legend (HTML4)

input[type=image] (HTML4)

Associated Accessibility Guidelines and Standards

Guideline or
Standard
Requirement Priority Test
Type
IITAA 10.2 Provide legends for groups of form fields. Required Violation
Section 508 1194.22 (n) When electronic forms are designed to be completed on-line, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues. Required Violation
WCAG 1.0 12.4 Associate labels explicitly with their controls. Required Violation
WCAG 2.0 2.4.6 Headings and Labels Required Violation

Examples

Evaluation Techniues

Testsuite Tests