Closed adam-lynch closed 8 years ago
I don't see why you'd ever want it turned off.
If you're using it as you are now, then it'll take the data-hint
value. If you decide to not give a data-hint
(I assume it does nothing right now), it'll now look for a title
and use it. If a title
also doesn't exist, it'll do what it does now when data-hint
is missing; nothing (same assumption again).
So, disabling it would only make sense for people using this currently without data-hint
which isn't a use case / doesn't make any sense. Right?
+1
+1
Came here to ask for this. Glad someone already filed the issue. :smile:
My main concern was, having the support for title
attribute will let us just add the CSS file to existing projects without updating the markup.
Was looking into this issue. Some thoughts:
[data-hint]
selector (https://github.com/chinchang/hint.css/blob/master/src/hint-core.scss#L13). If you provide a fallback to title
attribute and the element doesn't have a [data-hint]
attribute, the target selector wouldn't work anymore.title
attribute itself triggers a default tooltip which will conflict with Hint tooltips.Wouldn't a title
attribute be better for accessibility too?
In support of accessibility, Hint.css now works with aria-label
attribute too. As for supporting the title
attribute, conflict with the native tooltip is an issue which cannot be prevented.
Closing this issue.
+1 @adam-lynch Seems like to good idea. We just need some way to switch this feature on/off. Thinking loud...SASS variable (custom build) or may be just a line commented in the CSS to turn it on?