Skip to content

Conversation

@acstll
Copy link
Contributor

@acstll acstll commented Oct 23, 2025

Summary

This helps prevent an accessibility issue when screen-readers would announce the same text twice for action buttons in tables, when action.name (the label of the button) and action.description (that gets rendered in a tooltip) are exactly the same.

🔗 Row actions docs

Relates to elastic/kibana#215902

Why are we making this change?

To help improve accessibility. EUI alone cannot guarantee compliance. Ideally consumers would pass something different in the aforementioned props, e.g.

✅ Good

{
  name: 'Delete' // button label
  description: 'Delete user with id 1234' // tooltip content
}

❌ Bad

{
  name: 'Delete' // button label
  description: 'Delete' // tooltip content
}

This PR makes the tooltip visual-only for the latter.

Impact to users

🟢 Accessibility issues like elastic/kibana#215902 should get fixed by this.

QA

WIP

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

…n action button

when `name` and `description` are the same, the tooltip should be visual-only,
to avoid the same text being announced twice
@acstll acstll self-assigned this Oct 23, 2025
@acstll acstll added accessibility skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) support-duty-flywheel Label for PRs, see eui-private #310 labels Oct 23, 2025
@acstll acstll removed the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Oct 23, 2025
@acstll acstll marked this pull request as ready for review October 23, 2025 11:07
@acstll acstll requested a review from a team as a code owner October 23, 2025 11:07
Copy link
Contributor

@alexwizp alexwizp left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing that!

Copy link

@KodeRad KodeRad left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@mgadewoll mgadewoll self-requested a review October 29, 2025 10:11
toolTipProps={{
delay: 'long',
// Avoid screen-readers announcing the same text twice
disableScreenReaderOutput:
Copy link
Contributor

Choose a reason for hiding this comment

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

Non blocking suggestion:
Looking at the documentation, I feel like we could add some information about the expected usage to ensure accessibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a really good point, I will try and something in this regard to the docs 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an admonition in 667eac0

please let me know what you think 🙏


image

Copy link
Contributor

Choose a reason for hiding this comment

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

💭 The main issue I have with this is that this is a callout and we're placing too much content in it. Callouts should just be text.

How about we add an "Accessibility" section with admonition and snippet instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 667eac0

(feedback and suggestions very much appreciated 🙇)

Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

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

🟢 Changes LGTM. The tooltips behave as expected.
💭 While there can still be cases of duplicate output (non-string), we at least improve the base string usage with this update 👍

@acstll acstll enabled auto-merge (squash) October 31, 2025 11:37
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @acstll

@acstll acstll merged commit a433b4b into elastic:main Oct 31, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility support-duty-flywheel Label for PRs, see eui-private #310

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants