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?

ivysaurus
  • 138
  • 1
  • 10

1 Answers1

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).

slugolicious
  • 15,824
  • 2
  • 29
  • 43