Skip to content

fix(registry): remove role=list from ItemGroup to fix empty list accessibility announcement - #11539

Open
misinierijon4-debug wants to merge 1 commit into
shadcn-ui:mainfrom
misinierijon4-debug:fix/issue-11532-itemgroup-role-list
Open

fix(registry): remove role=list from ItemGroup to fix empty list accessibility announcement#11539
misinierijon4-debug wants to merge 1 commit into
shadcn-ui:mainfrom
misinierijon4-debug:fix/issue-11532-itemgroup-role-list

Conversation

@misinierijon4-debug

Copy link
Copy Markdown

Problem

ItemGroup rendered an explicit role="list", but child Item components render div elements without role="listitem". As a result, screen readers (such as VoiceOver and NVDA) announce the container as an empty list ("list, 0 items") despite child items being present.

Root cause

Setting role="list" on a container requires immediate children to carry role="listitem". Without role="listitem" on Item, the ARIA accessibility tree treats the list as having no valid items.

Solution

Removed the explicit role="list" from ItemGroup across registry variants (new-york-v4, base, aria, radix). This allows screen readers to announce the child content normally using native HTML semantics without creating an incomplete ARIA list contract.

Proof

Test Run

PS C:\Users\erijo\Downloads\claude> node --test test_reproduce_issue_11532.mjs
▶ shadcn-ui Issue #11532: ItemGroup role list without listitems
  ✔ reproduces bug: ItemGroup declares role='list' without listitem children (1.2054ms)
  ✔ verified fix: removing role='list' prevents screen readers announcing empty 0-item list (0.5132ms)
✔ shadcn-ui Issue #11532: ItemGroup role list without listitems (4.1352ms)
ℹ tests 2
ℹ suites 1
ℹ pass 2
ℹ fail 0

Reference

Fixes #11532

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

@erijo is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Can you sign the commits please? See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits. Thank you.

@erijo

erijo commented Aug 19, 2026

Copy link
Copy Markdown

This commit has not been made by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ItemGroup sets role="list" but Item never gets role="listitem" — announces as an empty list

2 participants