Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[a11y]: Carbon Tabs replacing the provided ID with an auto generated one. Also always expects a tabpanel to be associated so was it mentioned in the aria-controls property. #17566

Open
2 tasks done
prasanthdotv opened this issue Sep 25, 2024 · 0 comments

Comments

@prasanthdotv
Copy link

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

v1.61

React version

18.2.0

Automated testing tool and ruleset

IBM Equal Access Accessibility Checker

Assistive technology

No response

Description

Screenshot 2024-09-25 at 10 21 12 AM

For the table element the we have given the aria-describedby, which is pointing to the tab. Then we are providing the same id in the tab. When it rendered the id is replaced by carbon generated id ccs-:r1:-tab-0.

Also this tab element have aria-controls which is expecting a tab panel element always. So I had to add dummy visually hidden tab panel with the auto generated id to fix the violation.

WCAG 2.1 Violation

No response

Reproduction/example

https://stackblitz.com/edit/github-dmqw9c?file=src%2FApp.jsx

Steps to reproduce

  1. Create a Tab with a custom id.
  2. Inspect the element
  3. Check if the element have the same id.

Suggested Severity

None

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant