Skip to content

Conversation

XinaICBF
Copy link

@XinaICBF XinaICBF commented Aug 18, 2025

issue: 2171
issue: 2354
This PR addresses accessibility issues in the Tabs widget.

- Ensures focus is applied directly to <a> elements rather than <li>
Copy link

linux-foundation-easycla bot commented Aug 18, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. However, the changes here are quite breaking, as the tabs property is publicly available and I don't think we can change what it points to.

You can also see tests are failing.

Are you willing to address these issues?

@XinaICBF
Copy link
Author

XinaICBF commented Sep 5, 2025

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> is inside a <li role="tab">.

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 <a> element and avoids nesting issues.

I’ll explore this solution over the weekend and see what I can do.
Thanks!

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

Successfully merging this pull request may close these issues.

2 participants