Feature: only add ARIA-LABEL if the element does not already has one #5298
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks, this is a wonderful project ! So first thing first, thanks to all contributors, the library is great. We are working a lot on a11y since a week, and the problem we have with
Marker
is that it always has the samearia-label
derived from a default stringMarker.Title
. But in our use case, we want Markers to be self explainatory to our audience.Our custom HTML element for the marker has a good
aria-label
but it is replaced automaticly when the Marker is added to the map (addTo()
method).So my proposition here is to say : If the element already has an
aria-label
attribute that makes sense in the userland context, let's not replace it with the default Marker.Title.Edit
By the way, I just found that there was an issue related (sort of) to my PR : #355