Skip to content

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

@ldanet

Description

@ldanet

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

Metadata

Metadata

Labels

docsDocumentation changesfixBug fixesrulesIssue or false result from an axe-core rule

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions