w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

aria-required should be allowed on input type="file" #234

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi,

The HTML validator is telling me that using an aria-required attribute on an <input type="file"> is an error. In the ARIA in HTML specification, I can read that this field can accept all "Global aria-* attributes". aria-required is not on the list.

But, if I read the aria-required specification, I can read "Use the aria-required attribute on any element that is allowed the required attribute in HTML."

I can use a required attribute on an <input type="file"> so I should be able to use an aria-required attribute too.

scottaohara commented 4 years ago

hi @juliemoynat-tanaguru, this looks like an issue with the validator, not this specification. aria-required should not throw an error on a file input, and doesn't for other input types when testing in the validator.

ghost commented 4 years ago

Hi @scottaohara, shouldn't the specification for the input type="file" specify that the use of the aria-required attribute is allowed (just like the required attribute) as it's not a global aria-* attribute?

scottaohara commented 4 years ago

No. The specification has required which covers aria-required allowances. The only input that currently states that aria-required is allowed beyond global aria attributes is password. But that's an unnecessary call out per what I just referenced.

ghost commented 4 years ago

Ok. So I will create a ticket for the validator. Thank you