-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
It's recommended to use <button> instead of <a role="button">. We should change the use of <a> in all places we've introduced them:
- Context menu items
- Popup navigation controls
- Reload button
- Remove Layer button
- ...?
This would require a CSS reset to make buttons look seamless by default, e.g.:
.mapml-button {
background-color: transparent;
border: none;
border-radius: 0;
color: inherit;
font: inherit;
line-height: inherit;
margin: 0;
padding: 0;
overflow: hidden;
text-align: left;
text-align: inline-start;
text-transform: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}(This generic button class was originally proposed in #263 (comment).)
Info on <a> vs <button>:
- https://marcysutton.com/links-vs-buttons-in-modern-web-applications
- https://bitsofco.de/anchors-vs-buttons/
- https://www.w3.org/TR/2016/WD-wai-aria-practices-1.1-20160317/examples/button/button.html
This issue relates to #19 (same problem but keeping the issues separate as that one pertains to Leaflet's controls).
Reactions are currently unavailable