nuxt / nuxt/ui

USelectMenu does not comply with axe-core rule "Certain ARIA roles must contain particular children"

Open
#6,583 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage
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

https://play.ui.nuxt.com/#eNp9UctOwzAQ/JWVLwEJ2gOcqhSJQg9FAipaTphDlG5DWmdt+REqVfl31m4bOKCe4p2ZHc84e3FvzKANKEYid6WtjQeHPhhQBVVjKbyT4k5S3RhtPezB4ho6WFvdQMZrmSRJpSbnofbYOBhHxcWHJIBsUpRbpavsKk1LvdLH44xgbnVl0bkj8qgpen1entzaQgU8uvVGzObDQ0rOxANfaVThkSeA/H2BCkv/jBSgvW70ChU3SE5SwCgFZCB9GRjyVj7sLcQVl+XL13U12DhN/CL7aCtFqRtTK7SvxtccTooRJCZyhVL6+ylh3gZMbdLOF5bbf/CN20VMijm3R9tysp7zha3QH+jp4gV3fO5JrhMUq8+Qb+i0CjHjQTYJtOLYf3Qp7Sz9y5qqpZvuPJI7lYpBo7JLen65gA9nqv/GvRncpj1Jneh+AJZFxCk=

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

Image

This is because the listbox should only contain children with the role option or group. https://www.w3.org/WAI/ARIA/apg/patterns/listbox/

Image
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.