-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(18204): remove redundant aria-label in inline mode for AILabel component #18407
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18407 +/- ##
=======================================
Coverage 84.17% 84.17%
=======================================
Files 408 408
Lines 14435 14436 +1
Branches 4690 4661 -29
=======================================
+ Hits 12150 12151 +1
Misses 2120 2120
Partials 165 165 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page. |
Closes #18204
For
kind="inline"
in AILabel, aria-label duplicated visible text content (see phill's comment on the issue)This PR sets empty aria-label when kind='inline' to let native text content serve as accessible name:
label={kind === 'inline' ? '' : ariaLabelText
}Changelog
Removed
makes aria-label empty when kind='inline'
Added test cases to validate the cases
updated tests in Tabs
Testing / Reviewing
visit expandable AILabel storybook in deploy preview
run Accessibility Checker with 3.1.75 and later versions and verify "a11y Violation - Accessible name does not match or contain the visible label text " is not seen