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): does not allow separator in listbox #3938

Open
1 task done
EstebanG23 opened this issue Mar 8, 2023 · 2 comments
Open
1 task done

(aria-required-children): does not allow separator in listbox #3938

EstebanG23 opened this issue Mar 8, 2023 · 2 comments
Labels
rules Issue or false result from an axe-core rule spec Waiting for a related spec to make a change before adopting in axe-core

Comments

@EstebanG23
Copy link

EstebanG23 commented Mar 8, 2023

Product

axe-core

Product Version

No response

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

Accessibility tests to pass.

An item with role=separator should be acceptable as a child of an element with role=listbox.

Actual

Accessibility test fails aria-required-children test.

Error:

Fix any of the following:

Element has children which are not allowed (see related nodes)
Element has no aria-busy="true" attribute

Related node:

li[role="separator"]

How to Reproduce

html sample:

<ul role="listbox">
  <li role="option">
    Home
  </li>
  <li role="separator"></li>
  <li role="option">
    Colors
  </li>
</ul>
@EstebanG23 EstebanG23 added the ungroomed Ticket needs a maintainer to prioritize and label label Mar 8, 2023
@WilcoFiers
Copy link
Contributor

This is an interesting question. I'm going to reach out to the ARIA working group. The ARIA spec doesn't allow separators between options, but I'm wondering if they should, since those are allowed for menuitems. I'm curious what the reasoning is for allowing separators between menuitems, but not anything else.

BTW the way to address this issue is to use groups. Those should get announced and counted correctly.

@WilcoFiers
Copy link
Contributor

A related question came up today about using a separator in a tablist. It seems NVDA and VoiceOver ignore them in counting the number of options. I'm not sure whether that is because of the separator role, because the option had no accessible name, or something else. We'll need to test this.

@straker straker added spec Waiting for a related spec to make a change before adopting in axe-core rules Issue or false result from an axe-core rule and removed ungroomed Ticket needs a maintainer to prioritize and label labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rules Issue or false result from an axe-core rule spec Waiting for a related spec to make a change before adopting in axe-core
Projects
None yet
Development

No branches or pull requests

3 participants