diff --git a/src/control/Control.Zoom.js b/src/control/Control.Zoom.js index e8a983ec..0345d887 100644 --- a/src/control/Control.Zoom.js +++ b/src/control/Control.Zoom.js @@ -79,6 +79,12 @@ L.Control.Zoom = L.Control.extend({ link.href = '#'; link.title = title; + /* + * Will force screen readers like VoiceOver to read this as "Zoom in - button" + */ + link.setAttribute('role', 'button'); + link.setAttribute('aria-label', title); + L.DomEvent .on(link, 'mousedown dblclick', L.DomEvent.stopPropagation) .on(link, 'click', L.DomEvent.stop) diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js index 3e292989..a3848092 100644 --- a/src/layer/tile/TileLayer.js +++ b/src/layer/tile/TileLayer.js @@ -140,6 +140,12 @@ L.TileLayer = L.GridLayer.extend({ */ tile.alt = ''; + /* + Set role="presentation" to force screen readers to ignore this + https://www.w3.org/TR/wai-aria/roles#textalternativecomputation + */ + tile.setAttribute('role', 'presentation'); + tile.src = this.getTileUrl(coords); return tile;