4.3 Provide legends for all fieldsets
Sometimes in forms we have elements that are grouped, such as radio buttons. A sighted user can quickly see that they are visually grouped as well as see the label, or legend, that groups them. For a screen reader user to have a similar experience we want them to hear the legend and the overall grouping. This provides the full context as to what each input is.
WCAG 3.3.2: Labels or Instructions Opens in a new window
Details
- All
fieldset
s have alegend
as their first child.
Examples
Tips
- This implementation leads to some screen readers reading the legend on each input, while others read it when the user navigates in to the grouping. Either of these experiences is correct.