Techniques/F68 edits

From WCAG WG

Current Technique: http://www.w3.org/TR/WCAG20-TECHS/F68.html

Current title

F68: Failure of Success Criterion 1.3.1 and 4.1.2 due to the association of label and user interface controls not being programmatically determined

Change to

Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name.

Applicability

Change from applying to both 1.3.1 and 4.1.2 to only 4.1.2

note: Should this be 1.1.1 also?

Description

This failure describes a problem that occurs when no label element is used to explicitly associate a form control with a label where the visual design uses a label.

Change to

This failure describes a problem that occurs when a form control does not have a name exposed to assistive technologies. The result is that some users will not be able to identify the purpose of the form control. The name can be provided in multiple ways, including the label element. Other options include use of the title attribute and aria-label which are used to directly provide text that is used for the name or aria-labelledby which indicates an association with other text on a page that is providing the name. Button controls can have a name assigned in other ways, as indicated below, but in certain situations may require use of label, title, aria-label, or aria-labelledby.

Example 3

The search text box does in the following code example not have a name. The name can be supplied with either the title attribute or with a label element hidden with CSS.

Change to

The search text box does in the following code example not have a programmatically determinable name. The name can be supplied with any of the approaches mentioned above.

Procedure

For all input elements of type "radio", "checkbox", "text", "file" or "password", and all textarea and select elements in the Web page:

  1. Check that the visual design uses a text label that identifies the purpose of the control
  2. Check that these input elements have a programmatically determined label associated in one of the following ways:
  • the text label is contained in a label element that is correctly associated to the respective input element via the label's for attribute (the id given as value in the for attribute matches the id of the input element).
  • the control is contained within a label element that contains the label text.
  • the text label is correctly programmatically associated with the input element via the aria-labelledby attribute (the id given as value in the aria-labelledby attribute matches the id of the input element).
  • the input element is programmatically determined through the value of either its aria-label or title attributes.

Change to

For all input elements except those of type=hidden, and all textarea, button and select elements in the Web page:

  1. Check that each element has a programmatically determined name using one of the following ways:
  • the text label or labels are programmatically associated with the control element via the aria-labelledby attribute (each id given as a value in the aria-labelledby attribute matches the id of the text label element).
  • the control element is programmatically determined through the value of its aria-label attribute.
  • the text label is contained in a label element that is correctly associated to the respective control element via the label's for attribute (the id given as value in the for attribute matches the id of the control).
  • the control is contained within a label element that also contains the label text.
  • the control is a button element and it has text content that serves as the name.
  • If the control is an input of type image, the alt attribute provides a text label.
  • the control element is programmatically determined through the value of its title attribute.

Note: AWK removed the line about submit and reset buttons because it seems that it is impossible to fail with a submit or reset button unless the value for these is set to something that is grossly incorrect (e.g. a submit button with value=cancel) but in that case the issue affects all users equally. If the value is missing entirely then the browsers set the text on the button to "submit" or "submit query" or "reset" and that would pass despite the lack of effort.

Results

If check #1 is true and all options of check #2 are false, then this failure condition applies and the content fails these Success Criteria.

Change to

If all options of check #1 are false, then this failure condition applies and the content fails the Success Criteria.