Skip to main content
Version: v6

A checkbox without a state attribute was detected

A checkbox without a state attribute was detected — rule summary
FieldValue
Rule codeManual_Checkbox_State_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

Description

Elements that act as checkboxes and trigger functionality like checkboxes require an aria-checked attribute that reflects their active state. When the checkbox is checked, aria-checked should be set to true, and vice versa. Without the aria-checked attribute, the functionality of checkboxes will not be recognized by screen readers.

How to fix

Ensure elements that function as checkboxes have the aria-checked attribute provided. When the checkbox is active or checked, the aria-checked attribute should be set to true. When the checkbox is inactive or unchecked, the aria-checked attribute should be set to false.