Skip to content

Fix: improve tooltips accessibility#358

Open
rami-elementor wants to merge 1 commit intocore-betafrom
a11y-tooltips
Open

Fix: improve tooltips accessibility#358
rami-elementor wants to merge 1 commit intocore-betafrom
a11y-tooltips

Conversation

@rami-elementor
Copy link
Copy Markdown
Contributor

Currently, screen readers never announce tooltip text because it's a purely visual (CSS).

When you hover over the tooltip, it displays it. But it's not reachable for keyboard users.

With this PR, the tooltip can now be reached using your keyboard.

image

In addition, the accessibility tree is more clear:

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves tooltip accessibility by making tooltip content keyboard-reachable and better exposed to assistive technologies.

Changes:

  • Refactors the tooltip trigger into a focusable button and associates it with tooltip content via aria-describedby + role="tooltip".
  • Adds tooltip trigger styling and updates tooltip visibility CSS to support :focus-within.
  • Adds an explicit accessible label for ErrorTooltip.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/js/components/common/Tooltip.tsx Makes the tooltip trigger keyboard-focusable and wires up ARIA relationships for screen readers.
src/css/common/_tooltips.scss Styles the new trigger element and ensures tooltips appear on focus within (keyboard).

Comment thread src/css/common/_tooltips.scss
Comment thread src/css/common/_tooltips.scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants