Skip to content

Commit

Permalink
Programmatically identifiable map
Browse files Browse the repository at this point in the history
  • Loading branch information
Malvoz committed Aug 22, 2020
1 parent 0cf0de4 commit 7c86ddc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mapml-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ export class MapViewer extends HTMLElement {
}
}

// Make the Leaflet container element programmatically identifiable
// (https://github.com/Leaflet/Leaflet/issues/7193).
this._container.setAttribute('role', 'region');
this._container.setAttribute('aria-label', 'Interactive map');

this._setUpEvents();
// this.fire('load', {target: this});
}
Expand Down
6 changes: 6 additions & 0 deletions src/web-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ export class WebMap extends HTMLMapElement {
if (this.poster) {
this.poster.style.display = 'none';
}

// Make the Leaflet container element programmatically identifiable
// (https://github.com/Leaflet/Leaflet/issues/7193).
this._container.setAttribute('role', 'region');
this._container.setAttribute('aria-label', 'Interactive map');

this._setUpEvents();
// this.fire('load', {target: this});
}
Expand Down

0 comments on commit 7c86ddc

Please sign in to comment.