You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Always set a title attribute when truncating text via CSS #1923
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.
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?
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.
Activity
chandlerprall commentedon May 7, 2019
There isn't a clean way to extract a component's inner text, requiring a
titleprop will be much better.cchaos commentedon May 7, 2019
Can we only require the
titleif the contents is not astring?chandlerprall commentedon May 7, 2019
Yep! The messaging on that isn't controllable in TypeScript files, but we can definitely force an error in that state.
snide commentedon Sep 12, 2019
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?
cchaos commentedon Sep 12, 2019
I think we should audit where we auto-apply truncation and see which components would be enhanced by adding the inner-text component.
cchaos commentedon Sep 18, 2020
Need to assess the a11y implications of this as well. See #4040 as related
cchaos commentedon Sep 18, 2020
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.