ARIA in HTML - test cases for aria-checked

last updated 27 February 2021

checked is allowed on input type=checkbox and input type=radio elements

Tests:

Test 1

Authors SHOULD NOT use the aria-checked attribute on any element where the checkedness of the element can be in opposition to the current value of the aria-checked attribute.

The following input type=checkbox has an aria-checked=true, which does not update to match the checked state of the native element.

Expected result:
Warning that authors should not use aria-checked on the input.

Test 2

Authors SHOULD NOT use the aria-checked attribute on any element where the checkedness of the element can be in opposition to the current value of the aria-checked attribute.

The following input type=radio elements each have an aria-checked=true, which does not update to match the checked state of the native element.

test 2

Expected result:
Warning that authors should not use aria-checked on the inputs.