Skip to content

fix(DefinitionTooltip): make screen reader announce definition on hover #19482

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wkeese
Copy link
Contributor

@wkeese wkeese commented May 27, 2025

Closes #19285

Make DefinitionTooltip link the term to its definition via aria-describedby, just like Tooltip does.

Addresses the problem that JAWS doesn't announce the definition when the tooltip is opened, at least when opened by hover (openOnHover === true) rather than clicking.

Changelog

New

  • Add aria-describedby attribute for DefinitionTooltip, to link the term to its definition.

Testing / Reviewing

Storybook under JAWS. Tested DefinitionTooltip story in main/ vs. DefinitionTooltip story in this PR.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

Use aria-describedby for DefinitionTooltip just like Tooltip,
to link the term to its definition.

Addresses the problem that JAWS doesn't announce the definition when the
tooltip is opened, at least when opened by hover (openOnHover === true)
rather than clicking.

Fixes carbon-design-system#19285
Copy link

netlify bot commented May 27, 2025

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

Name Link
🔨 Latest commit a354ff0
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/683564395c13670008025e15
😎 Deploy Preview https://deploy-preview-19482--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 project configuration.

Copy link

netlify bot commented May 27, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a354ff0
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6835643905b8c80008912d05
😎 Deploy Preview https://deploy-preview-19482--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 project configuration.

@wkeese wkeese marked this pull request as ready for review May 27, 2025 08:29
@wkeese wkeese requested review from a team as code owners May 27, 2025 08:29
Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.91%. Comparing base (8f0cb4f) to head (a354ff0).
Report is 37 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19482   +/-   ##
=======================================
  Coverage   84.91%   84.91%           
=======================================
  Files         373      373           
  Lines       14504    14504           
  Branches     4794     4798    +4     
=======================================
  Hits        12316    12316           
  Misses       2040     2040           
  Partials      148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@heloiselui heloiselui left a comment

Choose a reason for hiding this comment

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

LGTM!

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]: DefinitionTooltip content not announced by JAWS
3 participants