From f91489c82db77233e7c35e43626983c85bb2e63a Mon Sep 17 00:00:00 2001 From: Anshpreet Date: Fri, 26 Nov 2021 13:52:25 -0500 Subject: [PATCH 1/2] removed timeout before focusing --- src/mapml/layers/MapLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapml/layers/MapLayer.js b/src/mapml/layers/MapLayer.js index 10cdf5268..aea229bdb 100644 --- a/src/mapml/layers/MapLayer.js +++ b/src/mapml/layers/MapLayer.js @@ -439,7 +439,7 @@ export var MapMLLayer = L.Layer.extend({ } mapEl.removeChild(e.target.closest("fieldset").querySelector("span").layer._layerEl); elem = elem ? root.querySelector(".leaflet-control-attribution").firstElementChild: elem = root.querySelectorAll('input')[fieldset]; - setTimeout(() => elem.focus(), 800); // a timeout is set so "pressed remove layer" is announced first + elem.focus(); // a timeout is set so "pressed remove layer" is announced first }, this); let itemSettingControlButton = L.DomUtil.create('button', 'mapml-layer-item-settings-control', layerItemControls); From 68cf501d834c78f2303d885ed02785b1e9498d59 Mon Sep 17 00:00:00 2001 From: Anshpreet8 <34603452+Anshpreet8@users.noreply.github.com> Date: Fri, 26 Nov 2021 14:01:42 -0500 Subject: [PATCH 2/2] Update src/mapml/layers/MapLayer.js Co-authored-by: Robert Linder --- src/mapml/layers/MapLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapml/layers/MapLayer.js b/src/mapml/layers/MapLayer.js index aea229bdb..6ccf7b6d7 100644 --- a/src/mapml/layers/MapLayer.js +++ b/src/mapml/layers/MapLayer.js @@ -439,7 +439,7 @@ export var MapMLLayer = L.Layer.extend({ } mapEl.removeChild(e.target.closest("fieldset").querySelector("span").layer._layerEl); elem = elem ? root.querySelector(".leaflet-control-attribution").firstElementChild: elem = root.querySelectorAll('input')[fieldset]; - elem.focus(); // a timeout is set so "pressed remove layer" is announced first + elem.focus(); }, this); let itemSettingControlButton = L.DomUtil.create('button', 'mapml-layer-item-settings-control', layerItemControls);