Skip to main content
Version: v6

A checkbox element is missing required aria attributes

A checkbox element is missing required aria attributes — rule summary
FieldValue
Rule codeCheckbox_AttributeRequirement_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

Description

Checkboxes must include specific ARIA attributes to be fully accessible to assistive technologies. These elements should have 'aria-checked' to reference the checked status of the checkbox. In elements that leverage the input[type=checkbox], a [checked] attribute is required. Missing any of these attributes can lead to incomplete or incorrect interpretation of the checkbox state by screen readers. Ensure all required ARIA attributes are present for checkbox elements. More details on ARIA role requirements are available here: https://www.w3.org/TR/wai-aria-1.1/#checkbox.

How to fix

To resolve this issue, ensure that each input[type=checkbox] or element that functions as a checkbox, has a state of checked. For input[type=checkbox], a [checked] attribute suffices. For non input elements that act as checkboxes, you can provide an [aria-checked=true] or [aria-checked=false] attribute. These attributes are essential for conveying the checkboxes' states and content, allowing screen readers to interpret them correctly.