Skip to content

[Discuss] If aria-labels are supplied, add them to the title attribute as well? #2021

Closed

Description

@cchaos

There's a lot of duplication on the consumer side to supply both a title and aria-label especially on EuiButtonIcon.

Screen Shot 2019-06-10 at 17 18 19 PM

Is there any way we can help out the consumer but auto-providing one or the other?

Activity

  1. PhilippBaranovskiy commented on Jun 17, 2019

    @PhilippBaranovskiy
    Contributor

    From my perspective, the best way would be to fill the title with the aria-label's value if the title is not provided. At the same time let it overrides with the separately provided value.

  2. snide commented on Sep 12, 2019

    @snide
    Contributor

    Inclined to close this. Titles and aria-labels are very different things. They sometimes are the same, and may even often be the same, but not always.

  3. cchaos commented on Sep 12, 2019

    @cchaos
    ContributorAuthor

    Agreed that they're not always the same, which is why we'd allow the title to be overridden. But more often than not, only aria-label is supplied or both are supplied and they are the same.

    I'm mostly thinking about icons and icon buttons that never have textual context and could really use titles to give sighted users insight into the icon's meaning or button's action.

  4. self-assigned this
    on Sep 12, 2019
  5. cchaos commented on Oct 21, 2019

    @cchaos
    ContributorAuthor

    This one has stagnated because our current implementation of icons which use SVG do not support the title attribute directly on an <svg> element.

  6. removed their assignment
    on Oct 21, 2019
  7. myasonik commented on Oct 22, 2019

    @myasonik
    Contributor

    Should we even be using title? If we use EuiTooltip instead, we get the accessibility and design "for free", don't we? And then we could reduce the duplication of separate title and aria-label props into one tooltip prop...

  8. cchaos commented on Oct 22, 2019

    @cchaos
    ContributorAuthor

    I find our tooltips to be too intrusive to use the as often as we add title. It would then also require us to be wrapping all these elements with EuiToolTip directly which may not be what the consumer expects especially if they want to provide their own tooltip content.

  9. myasonik commented on Oct 23, 2019

    @myasonik
    Contributor

    My biggest concern with supporting the title attribute isn't the duplication or setting them as defaults to one another (which I do think would be a nicer API) but the cases when they are different. In those cases, the title content is almost certainly not accessible.

    In which case, I'm back to thinking that custom tooltips are the way to solve this (even if it means a new "subtle" flavor of EuiToolTip.

    Sorry if this concern is out of scope of what you originally wanted to discuss - don't mean to hijack your thread.

  10. cchaos commented on Sep 18, 2020

    @cchaos
    ContributorAuthor

    See #4040 as related

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions