Success Criterion 3.3.2 Labels or Instructions: [Level A]
Techniques
Providing descriptive labels
Where labels are used, they should be be properly descriptive. In a form, the label should correctly identify the field and also identify required fields.
<label for="firstname">First Name (Required)</label><input id="firstname" type="text" /> <label for="lastname">Last Name (Required)</label><input id="lastname" type="text" /> </label>
If the input is required in a particular format, this information should also be provided.
To avoid repetition of instructions, it might be more suitable to provides instructions at the beginning.
All dates should be entered in the format dd/mm/yyyy.
In the case where validation is performed on a form, labels describing any errors should be supplied. See SC 3.3.1 for details.
Other labelling techniques
Other techniques using labels are covered in SC 1.1.1 and SC 1.3.1.
Using an adjacent button to label the purpose of a field
The use of a button is typically seen for search functionality. The button contains the purpose of the field and so no further labelling is required.
Failures
Not including label for visually formatted fields
Sometimes it may be obvious to a sighted person what a particular input field is for even without a label. However this will still probably cause confusion to a someone relying on a screen reader. In the following example the assumption could be made that the second name field is the last name but a screen reader cannot make assumptions they only work with the material provided.
<label for="name">Name (Required)</label><input id="name" type="text" /> <input type="text" /> </label>