Skip to content
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

Do not require textbox role in combobox if input[type=search] exists #1688

Closed
ldanet opened this issue Jul 9, 2019 · 3 comments
Closed

Do not require textbox role in combobox if input[type=search] exists #1688

ldanet opened this issue Jul 9, 2019 · 3 comments
Assignees
Labels
docs Documentation changes fix Bug fixes rules Issue or false result from an axe-core rule
Milestone

Comments

@ldanet
Copy link

ldanet commented Jul 9, 2019

This is effectively a duplicate of #549. That issue is marked as closed but the issue persists.

Expectation:
The code below should pass.
It is a copy paste of Example 1 of ARIA 1.1 Combobox with Listbox Popup Examples except I replaced input[type=text] with input[type=search]

<label for="ex1-input"
       id="ex1-label"
       class="combobox-label">
  Choice 1 Fruit or Vegetable
</label>
<div class="combobox-wrapper">
  <div role="combobox"
       aria-expanded="false"
       aria-owns="ex1-listbox"
       aria-haspopup="listbox"
       id="ex1-combobox">
    <input type="search"
           aria-autocomplete="list"
           aria-controls="ex1-listbox"
           id="ex1-input">
  </div>
  <ul aria-labelledby="ex1-label"
      role="listbox"
      id="ex1-listbox"
      class="listbox hidden">
  </ul>
</div>

Actual: aXe audit fails with Required ARIA child role not present: textbox for the #ex1-combobox element.

Motivation: As per the WAI-ARIA 1.1 recommendations for combobox:

Authors MUST ensure an element with role combobox contains or owns a text input element with role textbox or searchbox

input[type=search] should satisfy this requirement.

Here is a minimal page containing the above snippet: https://srvpf.codesandbox.io/

axe-core version: 3.2.2-canary.2390925
axe-coconut extension version 3.8.1

@straker
Copy link
Contributor

straker commented Jul 12, 2019

Thanks for reporting this, we'll take a look at the code to see what's going on.

@straker straker added fix Bug fixes rules Issue or false result from an axe-core rule labels Jul 12, 2019
@straker straker self-assigned this Jul 17, 2019
@jeankaplansky jeankaplansky added the docs Documentation changes label Aug 30, 2019
@jeankaplansky jeankaplansky self-assigned this Aug 30, 2019
@WilcoFiers WilcoFiers added this to the Axe-core 3.4 milestone Oct 16, 2019
@jeankaplansky
Copy link
Contributor

Added a link to the rule help back to the ARIA documentation specific to role="combobox" which explains the intent of the spec.

@chandana7393
Copy link

Tested, working as expected.
role_textbox

Tested Environment:
Axe-coconut - 4.0.0.29404v
Chrome - 77.0.3865.120v
OS - Windows 10 64 bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation changes fix Bug fixes rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

5 participants