Closed admrwe closed 2 months ago
Seems an issue with the validator if it’s making a distinction between the different button types. This spec doesn’t distinguish between the types for the button element, so it is allowed on any type.
Good to know! I will move this issue over to the validator repository - much appreciated!
In a 2022 PR (https://github.com/w3c/html-aria/pull/396) it appears the the
button
element was updated to accept arole="combobox"
, and the same change was made to the w3c Validator (https://github.com/validator/validator/pull/1301). However, I am still seeing parsing errors throw whenrole="combobox"
is added to abutton
usingtype="button"
.For example, this is invalid:
But this is valid:
Was this an oversight in the previous change? I don't believe it makes sense for
role="combobox"
to only be valid on a button using the implicittype="submit"
, since I would think that in a combobox pattern you would explicitly not want a button to submit its parentform
, since the job of abutton role="combobox"
is to control its associated popup element.Am I overlooking something? Or is this an additional improvement that could be made to the aria spec and the validator to support valid use cases of a combobox button?