do i need aria-checked on an actual checkbox
Asked Answered
H

1

5

I've seen a lot of examples of custom built checkboxes using the 'aria-checked' attribute, but do you need to put one when you've got an input type=checkbox? Or will it be accessible to screen readers natively?

Homogenous answered 8/3, 2018 at 17:57 Comment(1)
In short, no. It is redundant.Thole
A
19

The aria attributes are for when you're not using native html elements. A native checkbox does not need aria-checked. If you have a custom checkbox, such as <span role='checkbox' aria-checked='true'>, then you do need aria-checked (and other attributes as well).

Anatomical answered 13/3, 2018 at 23:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.