-
Notifications
You must be signed in to change notification settings - Fork 791
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
Allow using role 'combobox' on a native input element with type="search" #1580
Comments
There's two answers to that question. Firstly, the HTML-ARIA spec suggests you should not use That said, axe-core does allow you to do this, since IMO, there are quite a few use cases for doing so. So I agree with you that this shouldn't fail axe-core. Digging into this a little, axe-core seems to think that the implicit role for |
if you implement your own you can use per aria |
I came across this today also which failed because there is no textbox.
|
There are two ways to implement a combobox:
An So axe is correct to spec to not allow @DavidMacDonald That is indeed a bug. Another user also noticed that bug and reported in #1688. |
So I reviewed all the information and I am still confused. If I use the exact example #5 found at https://www.w3.org/TR/wai-aria-1.1/#combobox but change the input type from a text to a search I still see AXE violations. What I am trying to accomplish is having a combox and on Mobile the user gets the "Search" keyboard. The only way I know how to do that is by using type="search" Here is the code I am using via AXE and the violation. What is wrong with this code? <!DOCTYPE html> "Required ARIA child role not present: textbox" I created a JSBIN for it if you want to see it as well https://output.jsbin.com/quboxiz/ (non functional just used for AXE testing) |
Thank you I will track #1708 Thank you for your help! |
Expectation:
elements of type search are very similar to those of type text, except that they are specifically intended for handling search terms. Input text and input search should work the same with regards to the aria roles and attributes.
Actual:
When using an HTML5 input type "search" AXE is failing on role="combobox".
Motivation:
A combo box with suggestions can be specifically used for searching a website or other search related activities. The ability to allow the user to start typing with suggestions and to ultimately perform a search would be very useful.
Fails:
<input type="search" name="query" value="" aria-expanded="false" aria-haspopup="true" aria-label="Search" aria-autocomplete="list" id="input_query" role="combobox" placeholder="Search" autocomplete="off">
Passes:
<input type="text" name="query" value="" aria-expanded="false" aria-haspopup="true" aria-label="Search" aria-autocomplete="list" id="input_query" role="combobox" placeholder="Search" autocomplete="off">
Notes:
Says this was fixed as part of #549 but as far as I can tell it still is causing failures.
The text was updated successfully, but these errors were encountered: