missing-group
Rule Severity : Serious
Description
Fields that are logically related must be programmatically grouped to ensure that assistive technologies can accurately convey their relationships to users. This is particularly important for users who rely on screen readers or other assistive tools to understand the structure and context of form fields.
The missing-group
rule aligns with WCAG Success Criterion 1.3.1 (Info and Relationships), which requires that information, structure, and relationships conveyed through presentation must be programmatically determinable.
Examples
In the following example, fields that are logically related are not programmatically grouped. This violates the missing-group
rule because the relationships between the fields are not conveyed to assistive technologies.
In the following corrected example, the fields are programmatically grouped using the <fieldset>
and <legend>
elements, ensuring that the relationships between the fields are conveyed to assistive technologies:
How to fix?
To fix violations of the incorrect-group rule, follow these steps:
- Identify all fields on your webpage that are logically related.
- Use appropriate elements like <fieldset> and <legend> to programmatically group these fields.
- Ensure that each group is labeled with a <legend> element to provide context for the group.
Reference
WCAG Success Criterion 1.3.1: Info and Relationships
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!