test(a11y): cover delayed and interrupted Map Source focus

Keep the Esri settlement assertion exact, verify selected-source focus and Tab departure in Chromium, cancel pending work during disposal, and document the focused behavior.
This commit is contained in:
Sameh Khamis committed 2026-09-10 22:12:48 -07:00
1 parent 60812df34c
commit 231d339e92
6 files changed
+89 -14

No files matched your search

+7
View File
@@ -230,3 +230,10 @@ test('pointer leave preserves established keyboard focus and the open tray', ()
});
test('disposed UI cannot complete a pending handoff', () => {
const h = harness({ hidden: true }); h.key(); h.tick();
h.manager._disposed = true; h.show(); h.drain();
assert.equal(h.document.activeElement, h.disclosure);
assert.equal(h.calls(), 1); assert.equal(h.timers.size, 0);
});
+1 -1
View File
@@ -344,7 +344,7 @@ test('the Visual Presets tray owns Map Source and the retired left panel is abse
'the compact wing must expose a semantic keyboard disclosure',
);
assert.match(ui, /event\.key !== 'Escape'[\s\S]*?disclosure\?\.focus/);
assert.match(ui, /map-stack-chip\.active, \.map-stack-chip/);
assert.match(ui, /querySelector\('\.map-stack-chip\.active'\)\s*\|\| panelEl\.querySelector\('\.map-stack-chip'\)/);
assert.match(
ui,
+1
View File
@@ -10167,6 +10167,7 @@ export class StyleManager {
this._globalStatusNotice = null;
if (this._globalLoadingStatus) this._globalLoadingStatus.hidden = true;
this._disposed = true;
this._cancelMapSourceFocus?.();
// Revoke persistence/hash authority before teardown can emit manager changes.
this._layerStateCoordinator?.destroy();
this._layerStateCoordinator = null;