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 button elements instead of anchor elements and add tooltips to zoomcontrol #1708
use button elements instead of anchor elements and add tooltips to zoomcontrol #1708
Conversation
Very nice. Thanks. @fredj also did some work on that a while back. IIRC we decided against using buttons because styling buttons consistently across different browsers was not an easy problem. I'll have a closer look at your patch. |
I just take a quick look:
|
@elemoine it seems an error to me to not use the proper element. Choosing to do that because it doesn't look exactly the same on every platform makes form subordinate to function. |
@tonio I think you've got a good point here, but since this is about accessibility I think it's out of scope. (even though these controls need a work over since they are actually empty hyperlinks using Can you please describe what you mean with the dimension changes? I think it would be nice to cascade (parts) of a style, but to make that easier I would look into something like Sass. Using a css pre-processor also gives the advantage of optimizing the css during build. For an example of what this could look like see: https://sourceforge.net/p/dokuwikispatial/code/HEAD/tree/trunk/openlayersmap/src/scss/ eg. |
see #1725 |
OK, that's cool. |
closing this in favour of #1725 |
TL;DR: if it is a button it should be a button.
Using the correct semantics serves accessiblity and adding a tooltip (which is screen reader accessible) makes the button easier to understand for everyone. Also proper focus handling is important for keyboard users since the have no
:hover
eventthe tooltip can be easily disabled by removing the
:focus
and:hover
pseudo classes or using some simple css to override those.more background in: http://www.geodienstencentrum.nl/blog/accessibility/webmapping/2014-02-14/enhancing-openlayers-controls.html