third_party/aria-practices/src/content/patterns/checkbox/checkbox-pattern.html
WAI-ARIA supports two types of checkbox widgets: dual-state checkboxes toggle between two choices -- checked and not checked -- and tri-state checkboxes, which allow an additional third state known as partially checked.
One common use of a tri-state checkbox can be found in software installers where a single tri-state checkbox is used to represent and control the state of an entire group of install options. And, each option in the group can be individually turned on or off with a dual state checkbox.
The user can use the tri-state checkbox to change all options in the group with a single action:
fieldset.When the checkbox has focus, pressing the Space key changes the state of the checkbox.
The checkbox has role checkbox.
The checkbox has an accessible label provided by one of the following:
checkbox.checkbox.checkbox.When checked, the checkbox element has state aria-checked set to true.
When not checked, it has state aria-checked set to false.
When partially checked, it has state aria-checked set to mixed.
If a set of checkboxes is presented as a logical group with a visible label, the checkboxes are included in an element with role group that has the property aria-labelledby set to the ID of the element containing the label.
If the presentation includes additional descriptive static text relevant to a checkbox or checkbox group, the checkbox or checkbox group has the property aria-describedby set to the ID of the element containing the description.