Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.94k stars 996 forks source link

[accessibility] `removeOutsideVisibleBounds` is problematic for keyboard-only and screen reader users #1058

Open Malvoz opened 2 years ago

Malvoz commented 2 years ago

Problem

removeOutsideVisibleBounds is problematic for screen reader users, https://github.com/Leaflet/Leaflet/issues/3472#issuecomment-794280789:

simply hiding out-of-view markers is problematic to non-visual users, because (unlike e.g. https://github.com/Esri/a11y-map and https://github.com/mapbox/mapbox-gl-js/issues/10114) there's no feedback to users during/after pan & zoom which means that it would be nearly impossible for these users to reach/discover the initially hidden markers.

For keyboard-only users it's also very hard to reach or even discover any markers that are out of view.

Solution

From an accessibility perspective, it'd be best for removeOutsideVisibleBounds to be disabled by default.

And since marker clustering already is a performance enhancement itself I'd really like to see a consideration for changing the default.

In either case, the accessibility problem with removeOutsideVisibleBounds should be documented.

Additional context

Malvoz commented 2 years ago

Please label this: https://github.com/Leaflet/Leaflet.markercluster/labels/accessibility