Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.98k stars 1k forks source link

Accessibility Issue: Cluster Markers do not allow title / alt to be set #1107

Open deirdrehall opened 5 months ago

deirdrehall commented 5 months ago

In 2021, leaflet added role="button" to interactive markers (https://github.com/Leaflet/Leaflet/issues/7428). Per accessibility standards, a div which has a role as a button (or link or menuitem) must have an associated title and/or alt text string.

Because the marker object is created internally to the marker cluster code and there is currently no way to pass marker options into the creation, interactive cluster markers created by this library do not pass accessibility checks:

image

The library needs a way to pass in a title string for a cluster marker which can then be passed to L.marker.