USelectMenu does not comply with axe-core rule "Certain ARIA roles must contain particular children"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Environment
| Operating system | macOS 25.5.0 |
| CPU | Apple M1 Max (10 cores) |
| Node.js version | v20.19.4 |
| nuxt/cli version | 3.34.0 |
| Package manager | pnpm@10.33.0 |
| Nuxt version | 4.4.2 |
| Nitro version | 2.13.3 |
| Builder | vite@7.3.2 |
| Config | - |
| Modules | - |
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
v4.4.2
Reproduction
From the standard USelectMenu. Click on it to open the combobox and scan using axe Devtools.
It will then fail the rule Certain ARIA roles must contain particular children
This is because the listbox should only contain children with the role option or group. https://www.w3.org/WAI/ARIA/apg/patterns/listbox/
Description
The dropdown in USelectMenu has the role listbox but it has children that do not have the role group or option. That is both the combobox input and the wrapping div:
<div tabindex="-1" data-slot="focusScope" class="flex flex-col min-h-0">.
So, it fails the axe-core rule "Certain ARIA roles must contain particular children".
Additional context
This is not an issue on Reka's Combobox, partially because the combobox input is not within the popup.
https://reka-ui.com/docs/components/combobox
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the standard USelectMenu reproduction and inspect the opened combobox and listbox DOM while running axe DevTools. Trace the component entry point and surrounding focus-scope wrapper to identify why non-option children are inside the listbox. Done means the listbox structure follows the referenced ARIA pattern and the axe-core rule no longer reports an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100