How can you add an 'alt' tag to tile layers, and raise the accessibility score of an application, in particular to the Esri.WorldGrayCanvas, but any of the tiles found at http://leaflet-extras.github.io/leaflet-providers/preview/?
You could manipulate the tile images when they load by hooking into the tileload event:
esriGray.on('tileload', function (tileEvent) {
tileEvent.tile.setAttribute('alt', 'Map tile image');
});
That way the images always have the alt tag, even after zoom/pan and you don't have to use Jquery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With