set alt attribute on tiles to a null value so screen readers no longer read url for tiles

This commit is contained in:
justraines@gmail.com 2014-03-03 17:46:54 -05:00
parent c60ebb9a10
commit c1870976e6

View File

@ -56,6 +56,12 @@ L.TileLayer = L.GridLayer.extend({
tile.onload = L.bind(this._tileOnLoad, this, done, tile); tile.onload = L.bind(this._tileOnLoad, this, done, tile);
tile.onerror = L.bind(this._tileOnError, 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://warc.calpoly.edu/accessibility/508indepth/alternate.html
*/
tile.alt = '';
tile.src = this.getTileUrl(coords); tile.src = this.getTileUrl(coords);
return tile; return tile;