Fix(a11y/tabs) : move focusable element from <li> to <a>#2366
Open
XinaICBF wants to merge 2 commits intojquery:mainfrom
Open
Fix(a11y/tabs) : move focusable element from <li> to <a>#2366XinaICBF wants to merge 2 commits intojquery:mainfrom
XinaICBF wants to merge 2 commits intojquery:mainfrom
Conversation
- Ensures focus is applied directly to <a> elements rather than <li>
mgol
requested changes
Sep 5, 2025
Author
|
Hi, the current jQuery UI Tabs markup uses: <ul role="tablist">
<li role="tab">
<a href="#...">...</a>
</li>
</ul>This triggers a "nested interactive controls" accessibility warning because the A better approach, as shown in this Microsoft Teams example, is to use: <ul role="tablist">
<li role="presentation">
<a role="tab" href="#..." aria-controls="..." aria-selected="true">...</a>
</li>
</ul>This moves the interactive role and focus handling to the I’ll explore this solution over the weekend and see what I can do. |
Member
|
I added some comments with my thoughts to #2365. If you'd like to continue working on it, please take them into account. |
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.
issue: 2171
issue: 2354
This PR addresses accessibility issues in the Tabs widget.