From 5c0634d324e164180dd51711c437414e3d9530f5 Mon Sep 17 00:00:00 2001 From: Malvoz <26493779+Malvoz@users.noreply.github.com> Date: Tue, 18 May 2021 05:02:13 +0200 Subject: [PATCH] Set `role="application"` --- src/mapml-viewer.js | 4 +++- src/web-map.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mapml-viewer.js b/src/mapml-viewer.js index e9623054f..cfd0eb9ef 100644 --- a/src/mapml-viewer.js +++ b/src/mapml-viewer.js @@ -219,7 +219,9 @@ export class MapViewer extends HTMLElement { this.setControls(false,false,true); this._crosshair = M.crosshair().addTo(this._map); - + + // https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/274 + this.setAttribute('role', 'application'); // Make the Leaflet container element programmatically identifiable // (https://github.com/Leaflet/Leaflet/issues/7193). this._container.setAttribute('role', 'region'); diff --git a/src/web-map.js b/src/web-map.js index 607411c5b..bc173f264 100644 --- a/src/web-map.js +++ b/src/web-map.js @@ -254,6 +254,8 @@ export class WebMap extends HTMLMapElement { this.poster.style.display = 'none'; } + // https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/274 + this.setAttribute('role', 'application'); // Make the Leaflet container element programmatically identifiable // (https://github.com/Leaflet/Leaflet/issues/7193). this._container.setAttribute('role', 'region');