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

[accessibility] Accessible target size for controls #11037

Open
Malvoz opened this issue Sep 18, 2021 · 1 comment
Open

[accessibility] Accessible target size for controls #11037

Malvoz opened this issue Sep 18, 2021 · 1 comment

Comments

@Malvoz
Copy link

Malvoz commented Sep 18, 2021

The WCAG 2.1 SC 2.5.5 Target Size requires targets for pointer input to be at least 44 by 44 in CSS pixels. Meeting this requirement has multiple benefits, it'd be great to pass this criteria for the commonly used controls:

  • Attribution control (mapboxgl-ctrl-attrib-button)
  • Popup close button (mapboxgl-popup-close-button)
  • Fullscreen control (mapboxgl-ctrl-fullscreen)
  • Location control (mapboxgl-ctrl-geolocate)
  • Markers (mapboxgl-marker)
  • Navigation controls:
    • Zoom in (mapboxgl-ctrl-zoom-in)
    • Zoom out (mapboxgl-ctrl-zoom-out)
    • Compass/reset bearing (mapboxgl-ctrl-compass)
  • etc.?

It may not be desirable to increase the size of the icons themselves, in which case padding can be used to increase the size of the tap targets.

@Malvoz Malvoz changed the title [accessibility] Accessible target size for commonly used controls [accessibility] Accessible target size for controls Sep 18, 2021
@mourner mourner added this to the accessibility milestone Sep 20, 2021
@Malvoz
Copy link
Author

Malvoz commented Feb 5, 2022

As noted in Leaflet/Leaflet#7549 - WCAG 2.2 (which is yet to reach Recommendation status) has a more forgiving (from a designers point of view) success criterion (24x24 px): https://www.w3.org/TR/WCAG22/#target-size-minimum.

My personal opinion is that controls closer to 44x44 is a lot more user friendly on mobile. We use those dimensions for controls in the <mapml-viewer>, once you've become accustomed to it, anything less feels tiny. 😋

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