-
Notifications
You must be signed in to change notification settings - Fork 842
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
Always set a title attribute when truncating text via CSS #1923
Comments
There isn't a clean way to extract a component's inner text, requiring a |
Can we only require the |
Yep! The messaging on that isn't controllable in TypeScript files, but we can definitely force an error in that state. |
Inner text sort of fixed this https://elastic.github.io/eui/#/utilities/inner-text Do we still think this issue is valid? It seems like the only thing left is just carrying through? |
I think we should audit where we auto-apply truncation and see which components would be enhanced by adding the inner-text component. |
Need to assess the a11y implications of this as well. See #4040 as related |
Closing in favor of a Meta discussion around EuiTooltip flexibility which I've included a link to this discussion but needs to be a part of a greater effort. |
We need to establish a pattern where we add or require the html
title
attribute on elements that can be truncated with an ellipse. Most consumers don't think of this as necessary and tend to opt for the more intrusive tooltip to show the full text of the truncated element. All that's really necessary is the title attribute so that on long hovers, users can get the full text via the browser's internal tooltip mechanism.Example: EuiBreadcrumbs
It would also solve issues like #1706
Question
The one concern can be where the child element can be something other than a string (eg node). Is there a way we can pull just the inner text or should we just have the component require a
title
prop?The text was updated successfully, but these errors were encountered: