question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use `<button>` for controls

See original GitHub issue

Is your feature request related to a problem? Please describe.

<button> behaves a bit differently from <a href="#" role="button">, this would supersede https://github.com/Leaflet/Leaflet/issues/7368 and https://github.com/Leaflet/Leaflet/issues/7369 (these describe some of the problems with <a> controls).

Describe the solution you’d like

Use <button type="button"> over <a href="#"> for controls.

Additional context

Use buttons, not links, for controls

Agreed!

_Originally posted by @mourner in https://github.com/Leaflet/Leaflet/issues/3210#issuecomment-73291846._

we should use the button element here

This would be a breaking change we can make in Leaflet 2.

_Originally posted by @jonkoops in https://github.com/Leaflet/Leaflet/issues/7368#issuecomment-976742275._

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jonkoopscommented, Dec 16, 2021

I’ve created a label to keep track of breaking changes like these.

1reaction
Malvozcommented, Apr 18, 2022

@Chi-teck The buttons would have accessible names as they have now. This issue is about the elements themselves.

https://www.drupal.org/project/leaflet/issues/3232474

An aria-label to give the popup close button a proper accessible name was fixed in #7794.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use a command button to start an action or a series of actions
On the Design tab, in the Controls group, click Button. Click the location on the form where you want to place the command...
Read more >
Button | With Form Controls | JET Developer Cookbook - Oracle
Buttons direct users to initiate or take actions and work with a single tap, click, or keystroke. This shows how form controls and...
Read more >
How to use Button control in WPF - YouTube
How to use Button control in WPF. 2.6K views 7 years ago. WPF. WPF. 2.65K subscribers. Subscribe. 11. I like this. I dislike...
Read more >
Power Apps Button Control for Beginners - YouTube
We will also see how to create dynamic tabbed interface, filters & menu using PowerApps Button & Gallery Control. Definition: A button ......
Read more >
The Button element - HTML: HyperText Markup Language
The <button> HTML element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found