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

Listbox should not require a name when its used in a combobox pattern #3860

Closed
WilcoFiers opened this issue Jan 18, 2023 · 1 comment · Fixed by #3886
Closed

Listbox should not require a name when its used in a combobox pattern #3860

WilcoFiers opened this issue Jan 18, 2023 · 1 comment · Fixed by #3886
Assignees
Labels
fix Bug fixes pr A pr has been created for the issue wai-aria
Milestone

Comments

@WilcoFiers
Copy link
Contributor

This example should not fail. It comes straight out of WAI-ARIA 1.2:

https://www.w3.org/TR/wai-aria-1.2/#combobox

<label for="tag_combo">Tag</label>
<input type="text" id="tag_combo"
      role="combobox" aria-autocomplete="list"
      aria-haspopup="listbox" aria-expanded="true"
      aria-controls="popup_listbox" aria-activedescendant="selected_option">
<ul role="listbox" id="popup_listbox">
   <li role="option">Zebra</li>
   <li role="option" id="selected_option">Zoom</li>
</ul>

I think the fix would be to skip listbox if its part of a combobox pattern in the no-naming-method-matches method.

There's an issue open on WAI-ARIA for it: w3c/aria#1769 (comment)

@WilcoFiers WilcoFiers added this to the Axe-core 4.7 milestone Jan 18, 2023
@WilcoFiers WilcoFiers self-assigned this Jan 24, 2023
@WilcoFiers WilcoFiers added the pr A pr has been created for the issue label Jan 25, 2023
@padmavemulapati
Copy link

Validated with the latest axe-core develop branch code base, with the "role=listbox" , it is not needed any name when it is used in a combobox. No aria rules failing
Test snippet:

<label for="tag_combo">Tag</label>
<input type="text" id="tag_combo"
      role="combobox" aria-autocomplete="list"
      aria-haspopup="listbox" aria-expanded="true"
      aria-controls="popup_listbox" aria-activedescendant="selected_option">
<ul role="listbox" id="popup_listbox">
   <li role="option">Zebra</li>
   <li role="option" id="selected_option">Zoom</li>
</ul>

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes pr A pr has been created for the issue wai-aria
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants