Label groups of form elements [H71]

Test info
Possible Results

Test info

Test for Success Criterion 3.3.2

About

Checked Elements: form elements, and input elements of type radio and checkbox, fieldset elements
This test checks: <br> if there are not more than 8 controls in a form, not grouped by fieldsets. <br> if related radio buttons and checkboxes are grouped by fieldsets. <br> if the fieldset has a descriptive label provided by the legend element.

Short Description

form elements<br> It is necessary to provide a semantic grouping for related form controls. This allows users to understand the relationship of controls and interact with the form more effectively.<br> Form controls that are logically related (e.g. address fields) should be grouped by enclosing them with a fieldset element. All controls within a given fieldset are then related.<br><br> input elements of type radio and checkbox<br> Grouping controls is most important for related radio buttons and checkboxes, so they can be more easily treated as a single control.<br><br> fieldset elements<br> The first element inside every fieldset should be a legend element, which provides a label or instructions for the group. Often, user agents will present the value of the legend before the label of each control, to remind users that the same group

How to Repair

For form elements
Add a fieldset element around every related group of form controls. Provide a descriptive legend element as the first element of the fieldset that states the meaning of, or instructions for the enclosed elements.

For input elements of type radio and checkbox
A set of radio buttons or checkboxes is related when they all submit values for a single named field. Such groups and other groups of logically related form controls must be grouped by a fieldset element.
Add a fieldset element around every related group of radio buttons and checkboxes. Provide a descriptive legend element as the first element of the fieldset that states the meaning of, or instructions for the enclosed elements.

For fieldset elements
Provide a descriptive legend element as the first element of the fieldset. Further information: Accessible Forms using WCAG 2.0

WCAG 2.0

Principle 3: Understandable
Information and the operation of user interface must be understandable.
WCAG 2.0: Principle 3
Guideline 3.3: Input Assistance
Help users avoid and correct mistakes. Understanding Guideline 3.3
Success Criterion 3.3.2: Labels or Instructions (Level A)
Labels or instructions are provided when content requires user input (Level A).
Understanding: Success Criterion 3.3.2
Techniques

Possible Results

Failed The form seems to need structuring

The amount of form controls within the form usually needs grouping by fieldsets.

Failed The legend is ambiguous

The text of the legend element is a duplicate of another legend that occurs before this one in the same form.

Failed There is no text in the legend

The legend element contains only non-text content.

Failed The legend is empty

There is no content in the legend.

Failed The legend is missing

There is no legend labeling the fieldset.

Failed The radio buttons or checkboxes need grouping

There are related radio buttons or checkboxes (the radio buttons or checkboxes have the same name), that have to be grouped by fieldsets.

Passed Related radio buttons or checkboxes are grouped correctly

The set of related radio buttons or checkboxes does not need further grouping by a fieldset.

Passed Related radio buttons or checkboxes are grouped correctly

The set of related radio buttons or checkboxes does not need further grouping by a fieldset.

Passed The form seems to be structured correctly

There are no more than 8 form controls not grouped by fieldsets.

Passed Please check the legend

Human input is necessary to verify, that the legend describes the group formed by the fieldset.