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

Aria-required-children violation on role=combobox not valid #1009

Closed
ShawnChenXHC opened this issue Jul 16, 2018 · 8 comments
Closed

Aria-required-children violation on role=combobox not valid #1009

ShawnChenXHC opened this issue Jul 16, 2018 · 8 comments
Assignees
Labels
fix Bug fixes rules Issue or false result from an axe-core rule
Milestone

Comments

@ShawnChenXHC
Copy link

Hello, I would like to raise an issue around the aria-required-children violation.

Consider the following example:

<div role="combobox" aria-expanded="true" aria-haspopup="grid" aria-owns="ex-grid">
  <input type="text" aria-controls="ex-grid" />
</div>
<div role="grid" id="ex-grid">
</div>

When I run an aXe test on the above set of elements, the test would fail because of a violation of the aria-required-children check. The details reveal that the check failed because the <input>, having being defined with role="combobox", must have a child with role="listbox".

However, according to the WAI-ARIA guidelines for comboboxes, we can see that aside from listbox, there are three other permitted children roles: tree, grid, and dialog. The above example satisfies this condition because the combobox specifies its popup as being a grid and uses aria-owns to point to the specific grid tied to this combobox.

Looking at the role lookup table inside of the aXe engine, there are no provisions for these alternatives under the combobox section. If I am interpreting the WAI-ARIA guidelines correctly, then I believe this should be updated.

@WilcoFiers
Copy link
Contributor

Fair point. Have you done any testing with assistive technologies to see how well this is supported? I think we'd need to do that first. @Keerthi-Penukonda do you think you could do some testing for us with this?

@WilcoFiers WilcoFiers added the help wanted We welcome PRs or discussions for issues marked as help wanted label Aug 5, 2018
@Keerthi-Penukonda
Copy link

@WilcoFiers , tested the given code snippet with role="listbox" and also with role="grid". In both the cases screen reader behavior is same.
Tested in

  1. Chrome - NVDA on Windows
  2. Firefox - NVDA on Windows
  3. IE - JAWS on Windows
    Please let me know if anything needed.

@marcysutton
Copy link
Contributor

We need to test all of the combinations in our support matrix, there are a few more: https://github.com/dequelabs/axe-core/blob/develop/doc/accessibility-supported.md

@Keerthi-Penukonda
Copy link

Below are the screen reader behaviors with different combinations:

JAWS and IE on Windows:

  1. With role grid: Screen reader is announcing as “Edit combo use JAWS key+alt+m to move to the controlled element”. To set the value use the arrows keys or type the value.
  2. With role listbox: Screen reader is announcing as “Edit combo use JAWS key+alt+m to move to the
    controlled element”. To set the value use the arrows keys or type the value.

NVDA and FF on Windows:

  1. With role grid: Screen reader is announcing as “combobox expanded Edit has autocomplete blank” and sometimes announcing as just “Edit”
  2. With role Listbox: Screen reader is announcing as “combobox expanded Edit has autocomplete blank” and sometimes announcing as just “Edit”
    Observation:
  3. When the user pastes the URL in the address bar and navigates to the field, screen reader is announcing as blank
  4. When the user pastes some other URL in the same tab and navigates to the previous page(Our page) by pressing back arrow at the address bar, screen reader is announcing the role properly

VO in Safari on MAC:

  1. With role grid: Screen reader is announcing as “Edit text blank”
  2. With role ListBox: Screen reader is announcing as “Edit text blank”

VO in Safari on IOS:

  1. With role grid: Shows popup double tap to collapse
  2. With role ListBox: Shows popup double tap to collapse

TalkBack in Chrome on Android:

  1. With role grid: Editbox double tap to enter text
  2. With role ListBox: Editbox double tap to enter text

Note: I have not tested with Dragon as I have not worked with it earlier. I will ask any of the SME's who knows 'Dragon' and will update the screen behavior later.

@majornista
Copy link

majornista commented Nov 7, 2018

+1

We also need support for [role="combobox"][aria-haspopup="dialog"], which is necessary for Datepicker.

@WilcoFiers WilcoFiers added this to the Axe-core 3.5 milestone Sep 11, 2019
@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule and removed help wanted We welcome PRs or discussions for issues marked as help wanted labels Sep 11, 2019
@AdnoC AdnoC self-assigned this Dec 18, 2019
@jeankaplansky
Copy link
Contributor

Release notes updated as of 2/03/2020

@padmavemulapati
Copy link

Tried with role="combobox" and child with role="listbox"/"grid"/"tree" /"dialog"
seeing "Needs review(1)" for role="combobox" and child with role="listbox" and for all remianing getting voilation as "Certain ARIA roles must contain particular children" (attached Screenshots below)
image
image (6)

@padmavemulapati
Copy link

Working for axe-core, will verify the same with axe and attest extensions once axe-core3.5 deployed in devTools.

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

No branches or pull requests

8 participants