More aria attributes

This commit is contained in:
James Lyne 2021-05-26 03:07:24 +01:00
parent bbf057c84b
commit cce1f79a4d
3 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@
--> -->
<template> <template>
<div class="map" :style="{backgroundColor: mapBackground }" v-bind="$attrs"> <div class="map" :style="{backgroundColor: mapBackground }" v-bind="$attrs" aria-label="Map">
<MapLayer v-for="[name, map] in maps" :key="name" :map="map" :name="name" :leaflet="leaflet"></MapLayer> <MapLayer v-for="[name, map] in maps" :key="name" :map="map" :name="name" :leaflet="leaflet"></MapLayer>
<PlayersLayer v-if="playerMarkersEnabled" :leaflet="leaflet"></PlayersLayer> <PlayersLayer v-if="playerMarkersEnabled" :leaflet="leaflet"></PlayersLayer>
<MarkerSetLayer v-for="[name, markerSet] in markerSets" :key="name" :markerSet="markerSet" :leaflet="leaflet"></MarkerSetLayer> <MarkerSetLayer v-for="[name, markerSet] in markerSets" :key="name" :markerSet="markerSet" :leaflet="leaflet"></MarkerSetLayer>

View File

@ -55,7 +55,7 @@ export class DynmapLayerControl extends Control.Layers {
const element = super.onAdd(map); const element = super.onAdd(map);
this._layersLink!.innerHTML = ` this._layersLink!.innerHTML = `
<svg class="svg-icon"> <svg class="svg-icon" aria-hidden="true">
<use xlink:href="#layers" /> <use xlink:href="#layers" />
</svg>`; </svg>`;

View File

@ -40,6 +40,7 @@ export class LogoControl extends Control {
if (this.options.url) { if (this.options.url) {
link = DomUtil.create('a', '', container) as HTMLAnchorElement; link = DomUtil.create('a', '', container) as HTMLAnchorElement;
link.href = this.options.url; link.href = this.options.url;
link.setAttribute('aria-label', this.options.text);
} }
if (this.options.image) { if (this.options.image) {