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

Change <a role="button"> controls to <button type="button"> #473

Closed
Malvoz opened this issue May 21, 2021 · 0 comments · Fixed by #488
Closed

Change <a role="button"> controls to <button type="button"> #473

Malvoz opened this issue May 21, 2021 · 0 comments · Fixed by #488

Comments

@Malvoz
Copy link
Member

Malvoz commented May 21, 2021

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>:

This issue relates to #19 (same problem but keeping the issues separate as that one pertains to Leaflet's controls).

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

Successfully merging a pull request may close this issue.

1 participant