RAWEBA
11.6 In each form, does each group of related form controls have a legend?
- WCAG references
- 1.3.1 Info and Relationships (A)
- 3.3.2 Labels or Instructions (A)
- Techniques
- ARIA17
- H71
Official methodology to test criterion 11.6
Test 1 (11.6.1)
- Find the groups of related form controls in the document.
- For each group of related form controls, check that
- If the grouping uses a
<fieldset>element, the<fieldset>element has a<legend>element. - If the grouping element uses a WAI-ARIA
role="group"or"radiogroup"attribute, it has a WAI-ARIAaria-labeloraria-labelledbyattribute.
- If the grouping uses a
- Otherwise, for each of the related form controls, check for the presence of
- either a title attribute to determine whether the field belongs to the field grouping;
- or an
aria-labelattribute to determine whether the field belongs to the field grouping; - or an
aria-labelledbyattribute which references a passage of text used to determine whether the field belongs to the field grouping; - or an
aria-describedbyattribute which references a passage of text used to determine whether the field belongs to the field grouping;
- If this is the case for each group of form fields or for each of the related form controls, the test is validated.