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?
do i need aria-checked on an actual checkbox
Asked Answered
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).
© 2022 - 2024 — McMap. All rights reserved.