Skip to content

Discuss and document guidelines for using EuiTooltip vs the title property #3588

Closed

Description

@cchaos

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?

Originally posted by @timroes in #3568 (comment)


Starting a conversation ...

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.

Activity

  1. myasonik commented on Jun 10, 2020

    @myasonik
    Contributor

    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).

  2. snide commented on Jun 10, 2020

    @snide
    Contributor

    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... 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)

  3. myasonik commented on Jun 10, 2020

    @myasonik
    Contributor

    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

  4. cchaos commented on Jun 10, 2020

    @cchaos
    ContributorAuthor

    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.

  5. cchaos commented on Sep 18, 2020

    @cchaos
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions