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

Make controls button elements since they are buttons. Buttons are for actions, links are to take you to another page. #19

Open
prushforth opened this issue May 3, 2016 · 5 comments

Comments

@prushforth
Copy link
Member

This was the suggestion of @Powersurge on a11yslackers. He is correct, and perhaps this issue should be raised over at the Leaflet.js project, since the zoom control comes from there.

@prushforth prushforth added the bug label May 3, 2016
@Malvoz
Copy link
Member

Malvoz commented Jan 27, 2020

To my understanding, anchors are perfectly valid as buttons in this instance because role="button" is used, the buttons have accessible labels, and they respond correctly to keyboard input. Although I'm not certain, I think the usage of <a> is because buttons and other form elements are generally harder to style, e.g. they don't inherit font styles by default, and CSS appearance doesn't have (or didn't have at the time) wide enough browser support to warrant its use.

Anyhow, there's a leaflet issue to tackle some accessibility issues in Leaflet/Leaflet#3210, including moving from links to buttons.

@prushforth
Copy link
Member Author

I think that's good enough for me at this time. Closing; feel free to discuss if necessary.

@Malvoz
Copy link
Member

Malvoz commented Dec 8, 2020

#19 (comment):

they respond correctly to keyboard input

That statement is incorrect, filed upstream issue: Leaflet/Leaflet#7369.

@Malvoz
Copy link
Member

Malvoz commented May 21, 2021

This issue should consider not only Zoom controls but all standard Leaflet controls, such as a popup's Close button, Fullscreen control, Layer control.

@Malvoz Malvoz removed the bug label Jun 29, 2021
@Malvoz Malvoz changed the title Make zoom controls button elements since they are buttons. Buttons are for actions, links are to take you to another page. Make controls button elements since they are buttons. Buttons are for actions, links are to take you to another page. Aug 5, 2021
@Malvoz
Copy link
Member

Malvoz commented Oct 8, 2021

These buttons can utilize the generic .mapml-button class to reset default UA styles for <button>s.

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

No branches or pull requests

2 participants