diff --git a/clients/web/src/components/elements/AppElicitation/AppElicitationHost.test.tsx b/clients/web/src/components/elements/AppElicitation/AppElicitationHost.test.tsx index 420ecf08..4baeae74 100644 --- a/clients/web/src/components/elements/AppElicitation/AppElicitationHost.test.tsx +++ b/clients/web/src/components/elements/AppElicitation/AppElicitationHost.test.tsx @@ -216,6 +216,12 @@ describe("AppElicitationHost (#1854)", () => { await flushAsync(); expect(screen.getAllByTestId("app-elicitation")).toHaveLength(2); + // The covered dialog is inert: out of the a11y tree and out of focus + // order, but still mounted — its app keeps its bridge and handshake. + const [lower, top] = screen.getAllByTestId("app-elicitation"); + expect(lower.hasAttribute("inert")).toBe(true); + expect(top.hasAttribute("inert")).toBe(false); + await user.keyboard("{Escape}"); // Exactly one request is dismissed — the topmost, which is the last one. expect(onFail).toHaveBeenCalledTimes(1); diff --git a/clients/web/src/components/elements/AppElicitation/AppElicitationHost.tsx b/clients/web/src/components/elements/AppElicitation/AppElicitationHost.tsx index 5b2ea014..21677bf5 100644 --- a/clients/web/src/components/elements/AppElicitation/AppElicitationHost.tsx +++ b/clients/web/src/components/elements/AppElicitation/AppElicitationHost.tsx @@ -253,6 +253,13 @@ function AppElicitationFrame({ only the request id tells those two dialogs apart — for `landmark-unique` and for anyone navigating by screen reader. */}