-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button role should allow aria-required #1253
Comments
generally allowing Rather than taking this approach, could you not use the |
Unfortunately, for our case, a combobox would allow typing inside of the component which would rather map to a material autocomplete component rather than a material select element. |
Combobox does not have to allow typing inside the component. An example of a "select-only" combobox is being developed for the ARIA Practices Guide. It's not ready yet, but it will look something like the codepen linked in w3c/aria-practices#1026 (comment) Edit: Or, more accurately, the one linked in w3c/aria-practices#1026 (comment) |
A native Circling back, my point here is that a blanket allowance of |
As long as the ARIA practice recommends buttons for listboxes, it should also be possible to mark them with aria-required, aria-invalid and aria-errormessage. However, it would be better to remove the example https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html, see: w3c/aria-practices#1137 |
i disagree that there is no validity to demonstrating a pattern if that pattern doesn't completely replicate a native HTML control it is described as being "similar to". But, as the topic of that particular pattern's removal is not new, and seems to have support due to the revised combobox pattern providing more equivalent |
Heya, thanks for the select-only combobox example. There have been several other engineers that have pointed out that previous listbox button example on w3.org, so I can't wait until the combobox one gets published as well. I think this solves our use case without the need for a spec change |
Great! Glad we could help. I'll close this issue, then. |
Description
Button role should allow aria-required since the button role can be u sed as a popup button and it works in practice anyway.
Spec
Spec: https://www.w3.org/TR/wai-aria-1.1/#aria-required
Core-AAM language: https://www.w3.org/TR/core-aam-1.2/#details-id-164
Please note that the spec lists roles but the core-aam language does not.
Example / Use Case
An example is a widget to replace the native
<select>
element. Consider the following markup:In that markup we have a form with two inputs: a native input and a collapsible dropdown listbox that is meant to act like a native
<select>
element.A user tabbing through the form with a screen reader would hear "street address,text, required" and then "state, listbox popup collapsed, required". Unfortunately adding
aria-required
torole="button"
is against the spec.Alternatives tried
Spec does allow
aria-required
onrole="listbox"
, but in windows NVDA screen reader will not read out "required" unless the popup is opened, and mac voiceover simply will not read "required" on listboxes. Thus a user simply tabbing through the form will not know that the<select>
/role="button"
is required until after attempting to submit the form.The text was updated successfully, but these errors were encountered: