validator icon indicating copy to clipboard operation
validator copied to clipboard

Input with `aria-controls` and `aria-expanded` leads to error `Element input is missing required attribute role`

Open codeflorist opened this issue 10 months ago • 0 comments

URL being validated or code to reproduce error:

<input
  type="checkbox"
  aria-label="Toggle Full Navigation"
  aria-controls="full-navigation"
  aria-expanded="false"
/>

As far as i know, the used aria-attributes should be valid for an input. So i'm confused, why this is even throwing an error.

Apart from that, the error Element input is missing required attribute role does not make sense for me, since afaik the input should not require a role, but https://github.com/validator/validator/issues/498 states, that this is a general problem with the validator.

codeflorist avatar Mar 14 '25 10:03 codeflorist