esri-leaflet-legend
esri-leaflet-legend copied to clipboard
Add support for alt text for legend images
I've added an alt
property to the legend images. I'm using the label property.
I also added a second map service to the example that has label values set.
Thanks a lot for your PR, do you think we can fix the localisation issue there?
I removed the English text in the alt
attribute, and now only reference the label
property from the map service. This still helps with web accessibility (assuming there is a label for the map layer).
I still think it would be cool to add a constructor option to set default alt
text. I tried, but failed to figure it out. And anyway, it is your call if you would even want that.
Thanks for the feedback.
I suggested a way to pass the alt string template, do you want to add it? I can merge without it though, if you don't have time
I did try something similar to what you proposed. But I kept getting jshint
errors and the files wouldn't build.
I don't know when I'll be able to dig into this further, so I would be fine if you merge it as is.
Did you want to merge it as is? Even though we want to add in the user-defined alt template text. This will at least provide a basic level of the alt
attribute.