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

fix(18204): remove redundant aria-label in inline mode for AILabel component #18407

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Jan 23, 2025

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

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit b58e020
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67921c3a87bcf3000821bd2a
😎 Deploy Preview https://deploy-preview-18407--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b58e020
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67921c3a55a91100084e3226
😎 Deploy Preview https://deploy-preview-18407--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit b58e020
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67921c3a3c53c50008a86ca4
😎 Deploy Preview https://deploy-preview-18407--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@2nikhiltom 2nikhiltom marked this pull request as ready for review January 23, 2025 10:41
@2nikhiltom 2nikhiltom requested a review from a team as a code owner January 23, 2025 10:41
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.17%. Comparing base (02d6f94) to head (b58e020).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

LGTM

@annawen1 annawen1 added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit 5e097cd Jan 24, 2025
37 checks passed
@annawen1 annawen1 deleted the fix_ailabel1a11y branch January 24, 2025 20:43
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

[a11y]: AILabel has a11y Violation - Accessible name does not match or contain the visible label text
4 participants