Radio and checkbox groups are composite controls. The error belongs to the group, so the fieldset (role group) names the error and the help text in aria-describedby. The individual options do not each reference the error; doing that would repeat the group error for every child.
What to notice
- Each fieldset carries one error reference and one help reference. The error is first.
- The radio and checkbox inputs have no
aria-describedbyof their own; the group is the semantically appropriate target. - No
aria-errormessageon the fieldset: the role does not support it. - The error text is inside the fieldset after the options. It is visible and is also the target of the group description.
- An independent child error would be its own
#errorsand would get its own reference. The group would not inherit it.
Back to the overview.