-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use a standard title attribute for the control buttons #2781
Conversation
Sorry, but I don’t like this change. Current implementation allows (without external plugins) the display of tooltip without delay (unlike Those changes were made for accessibility, & are IMHO useful. |
If I may way in: jqueryui has the same kind of feature, i.e. use the title attribute to display a tooltip. I has an issue on ios, when the element is an input. See http://bugs.jqueryui.com/ticket/9349. |
Coincidentally, I was just going to open a ticket for discussion about the current control tooltips. My preference would be to have them be "opt in" instead of "opt out." I appreciate the accessibility benefits they currently bring, but I'd still rather see us provide an easy way to add control tips rather than make the decision that they should be shown by default. And for me, "provide an easy way" could be "show an example that uses an external library or straight dom" (as we do for popups). |
What I dislike about the current implementation is it's too opinionated. I know that it's relatively easy to customize this behavior with css but it implies too much of work. My opinion is that we have to provide a very minimalist implementation and let the users use their own tools. |
2119ef3
to
c6e0a42
Compare
8bd9c06
to
81e4466
Compare
I've updated the custom-controls example to show how to customize the tooltips with bootstrap |
@fredj how about creating a dedicated example demonstrating how to add tooltips to controls (instead of doing this in custom-controls)? Curious what others think about this. I understand @tonio's perspective. But having just spent a lot of time undoing/redoing ol3's tooltip (and attribution control) handling, I also like the idea of limiting our DOM manipulation to the absolute minimum and letting people make choices that integrate well with the rest of their application. |
I agree with @tschaub. |
ok, dedicated example added |
+1 |
Thanks for the review |
Use a standard title attribute for the control buttons
Looks good to me as well. I appreciate the effort @tonio put into the design and functionality on this. But I'm in favor of moving to just using the Curious if others have opinions about |
It was a workaround added in openlayers#1761 to hide the button tooltip on OSX / Chrome 32 and 33. Because we're not using the tooltips anymore (see openlayers#2781) and this version of chrome is deprecated this workaround can be removed.
Instead of a (IMHO overcomplicated) custom span element.
As a bonus, it makes the use of the bootstrap plugin very easy (the plugin uses the title attribute by default)