{{ message }}
Repository navigation
fix(aria-allowed-role): allow li roles under non-list parents - #5457
Closed
MohammediYunus wants to merge 1 commit into
Closed
MohammediYunus wants to merge 1 commit into
MohammediYunus wants to merge 1 commit into
Conversation
Allow roles such as tabpanel on li when the immediate represented parent has no list semantics. Preserve restrictions when the parent is a list or its context is unknown, and avoid accessible-name recursion during parent classification. Cover role-token fallback, presentation conflicts, custom elements and shadow trees with matcher, standards, virtual and HTML/JSON regressions. Closes: dequelabs#4910
straker
reviewed
Oct 13, 2026
straker
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the pr. Unfortunately I don't think we should merge it in as is. Ideally we'd want to use getRole in the matcher in order to resolve the role of the parent, but we can't at the moment and I don't want to duplicate all the same logic as in is-sectioning-content to work around the issue.
I think until we implement #5263 we shouldn't work on fixing this bug.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

List items used as tab panels are reported by aria-allowed-role even when their parent has no list semantics. This fixes the presentational list pattern in #4910 by allowing arbitrary roles only when the immediate represented parent is known not to have the list role.
Native and explicit list restrictions, presentation conflicts, role-token precedence, custom-element roles and unknown-parent behavior remain covered. Parent classification avoids accessible-name lookup, which can recurse through the child being checked. The patch adds matcher, standards, serialized-tree and HTML/JSON regressions, including shadow DOM cases.
Validation:
Closes: #4910