When is Cardinality Reported for Groups of Checkboxes and Radio Buttons
The examples on this page should be tested with a variety of screen readers to determine when (and how) the cardinality of the groups of checkboxes or radio buttons is reported.
Support Summary:
- It is the shared value of the radio button's
name
attribute that lends cardinality to radio button groups. -
There is wide support on desktop platforms for both the
role=group
+aria-labelledby
and thefieldset
+legend
grouping techniques. - Because wrapping checkboxes or radio buttons in list items either does not add screen reader-exposed semantics or adds extra (likely undesirable) verbosity, the technique ought to be avoided.
Fieldset and Legend Grouping of Checkboxes, No List
Fieldset and Legend Grouping of Radio Buttons, No List
Fieldset and Legend Grouping of Checkboxes, Inputs in List
Fieldset and Legend Grouping of Checkboxes, Inputs in List (List Not Visible)
Fieldset and Legend Grouping of Checkboxes, Inputs in List (List Not Visible But with ARIA Shimmed-in List Semantics)
Shimmed-in role="list"
and role="listitem
to re-establish list semantics for AT/browsers that lose the
semantics when the list style is set to "none."
Fieldset and Legend Grouping of Radio Buttons, Inputs in List
Grouping of Checkboxes Using Role Group, No List
Example Five
Grouping of Radio Buttons Using Role Group, No List
Example Six
Fieldset of Checkboxes Using Role Group, Inputs in List
Example Seven
Fieldset of Checkboxes Using Role Group, Using aria-posinset
and aria-setsize
to Attempt to Assert Cardinality
Using aria-posinset
and aria-setsize
on the inputs to try to force some cardinality. This technique will throw
an axe error, since neither ARIA attribute is allowed on an input and are not considered “global” ARIA attributes.
Example Seven A
Fieldset of Radio Buttons Using Role Group, Inputs in List
Example Eight