mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
Merge pull request #2509 from dvito/add_alt_to_tiles
Add alt to tiles for accessibility reasons
This commit is contained in:
@ -56,6 +56,12 @@ L.TileLayer = L.GridLayer.extend({
|
||||
tile.onload = L.bind(this._tileOnLoad, this, done, tile);
|
||||
tile.onerror = L.bind(this._tileOnError, this, done, tile);
|
||||
|
||||
/*
|
||||
Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
|
||||
http://www.w3.org/TR/WCAG20-TECHS/H67
|
||||
*/
|
||||
tile.alt = '';
|
||||
|
||||
tile.src = this.getTileUrl(coords);
|
||||
|
||||
return tile;
|
||||
|
Reference in New Issue
Block a user