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
Discuss and document guidelines for using EuiTooltip vs the title property #3588
Could you clarify if this is a general recommendation not to use EuiTooltip then anymore? Because this performance issue is really severe for us, and if the solution from design is to use title instead, we'd start removing EuiTooltip in large across our apps. So would be good to have some clarity (and maybe adding it to the EUI documentation) if we no longer recommend using this component, or if the issue can somehow be prioritized on your side?
on how we want to handle our guidance to consumers over when to use EuiTooltip or simply use title. I know there's also some a11y concerns to consider.
Generally, title is considered completely inaccessible so I'd basically never recommend using it.
With alternatives, title could be part of an accessible pattern but, at that point where you're already building alternatives, why not build a single accessible alternative?
It might be easier to make a more performant tooltip if it was text only (whereas Tooltip currently allows any JSX) which matches the capabilities of title and would also make accessibility easier so it seems like a win all around (though I haven't actually researched the perf aspects of this and am guessing).
There is one good place where title works and where it's fine as far as accessibility, and that's in showing a CSS (key part!) truncated word in string form.
Dave Sni... becoming Dave Snider in a title is perfectly fine because it works accessibily in a screenreader regardless.
Generally this is the best (and probably only) place to use it. If we have issues with how tooltips look, perform, or render vs title, we should likely augment tooltip to better address those concerns since as @myasonik mentions, we have better control over it's abilities (especially when it contains content that is not in the original string)
title still doesn't help keyboard or touch (i.e., mobile/tablet) only users so you're right that screen readers will pick up on the full string but it's still worse than us building a solution
I've had on my personal Todo list of experimentations is a truncation component (EuiTruncate) that automatically adds an EuiTooltip. This is probably the best solution to provide consumers with easy to use truncation best practices since a lot of them don't even use title or any other method of providing the full string. Though it may all hinge on being able to me EuiTooltip more performant.
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
myasonik commentedon Jun 10, 2020
Generally,
titleis considered completely inaccessible so I'd basically never recommend using it.With alternatives,
titlecould be part of an accessible pattern but, at that point where you're already building alternatives, why not build a single accessible alternative?It might be easier to make a more performant tooltip if it was text only (whereas Tooltip currently allows any JSX) which matches the capabilities of
titleand would also make accessibility easier so it seems like a win all around (though I haven't actually researched the perf aspects of this and am guessing).snide commentedon Jun 10, 2020
To somewhat respond to @myasonik's observation.
There is one good place where title works and where it's fine as far as accessibility, and that's in showing a CSS (key part!) truncated word in string form.
Dave Sni...becomingDave Sniderin a title is perfectly fine because it works accessibily in a screenreader regardless.Generally this is the best (and probably only) place to use it. If we have issues with how tooltips look, perform, or render vs title, we should likely augment tooltip to better address those concerns since as @myasonik mentions, we have better control over it's abilities (especially when it contains content that is not in the original string)
myasonik commentedon Jun 10, 2020
titlestill doesn't help keyboard or touch (i.e., mobile/tablet) only users so you're right that screen readers will pick up on the full string but it's still worse than us building a solutioncchaos commentedon Jun 10, 2020
I've had on my personal Todo list of experimentations is a truncation component (EuiTruncate) that automatically adds an EuiTooltip. This is probably the best solution to provide consumers with easy to use truncation best practices since a lot of them don't even use
titleor any other method of providing the full string. Though it may all hinge on being able to me EuiTooltip more performant.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.