Skip to content
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

Icon titles don't show as tooltips #3214

Closed
invliD opened this issue Dec 5, 2018 · 2 comments
Closed

Icon titles don't show as tooltips #3214

invliD opened this issue Dec 5, 2018 · 2 comments

Comments

@invliD
Copy link
Member

invliD commented Dec 5, 2018

Steps to reproduce

  1. <Icon icon="error" title="No good!" />

Actual behavior

The title is not shown in a tooltip

Expected behavior

The title is shown as a browser tooltip, like any other element's title prop

Possible solution

Put the title on the span around the icon, not in a desc element inside the icon.

The current purpose of title seems to be what should be called alt

@giladgray
Copy link
Contributor

little context here: #2321, #2410. the original browser tooltip behavior was very obnoxious because every icon would get a browser tooltip, so i switched the SVG element to one that provides the same a11y but doesn't show a tooltip.

i see valid uses for occasional browser tooltips, but it can't be the default behavior.

given that, we can't repurpose the existing title prop as that would be an API break (per the docs: "This string does not appear in normal browsers...").

@invliD @gabeboning how about adding an htmlTitle prop that sets title on the wrapper DOM element? in v4 we can switch the names around.

@giladgray
Copy link
Contributor

fixed in #3216

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

No branches or pull requests

2 participants