From ba2e56a5a706fc9f43b3089335913ac836b22b33 Mon Sep 17 00:00:00 2001 From: Renfei Wang Date: Mon, 27 Jul 2026 14:19:08 -0400 Subject: [PATCH] test: synchronize accessibility fixture navigation --- apps/theme-manager/scripts/verify-a11y.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/theme-manager/scripts/verify-a11y.mjs b/apps/theme-manager/scripts/verify-a11y.mjs index e2e30ae..b4d6754 100644 --- a/apps/theme-manager/scripts/verify-a11y.mjs +++ b/apps/theme-manager/scripts/verify-a11y.mjs @@ -485,7 +485,12 @@ async function main() { await session.send("Page.navigate", { url: url + "?confirm=1" }); await waitFor("the native confirmation fixture", async () => evaluate(session, `(() => { const apply = document.querySelector("#applySkin"); - return Boolean(apply && window.__ACT_A11Y__ && !document.querySelector("#persistenceConsentDialog")?.open); + return Boolean( + new URL(window.location.href).searchParams.has("confirm") + && apply + && window.__ACT_A11Y__ + && !document.querySelector("#persistenceConsentDialog")?.open, + ); })()`)); await evaluate(session, `document.querySelector("#applySkin")?.focus()`); await pressKey(session, "Enter", "Enter", 13, 0, "\r"); @@ -551,7 +556,8 @@ async function main() { await waitFor("the fallback consent fixture", async () => evaluate(session, `(() => { const apply = document.querySelector("#applySkin"); return Boolean( - apply + new URL(window.location.href).searchParams.has("fallback") + && apply && window.__ACT_A11Y__ && !document.querySelector("#persistenceConsentDialog")?.open && matchMedia("(forced-colors: active)").matches