diff --git a/frontend/src/styles/test.scss b/frontend/src/styles/test.scss index fea6c859bb21..daa6e532be96 100644 --- a/frontend/src/styles/test.scss +++ b/frontend/src/styles/test.scss @@ -1626,14 +1626,16 @@ } main.focus .pageTest { - #testModesNotice { - opacity: 0 !important; - } - #testConfig { + #testModesNotice, + #testConfig, + #mobileTestConfigButton { opacity: 0 !important; } - #mobileTestConfigButton { + #restartTestButton { opacity: 0 !important; + &:focus-visible { + opacity: 1 !important; + } } } diff --git a/frontend/src/ts/components/layout/header/Nav.tsx b/frontend/src/ts/components/layout/header/Nav.tsx index cdc3c1b9a291..1509a27830e6 100644 --- a/frontend/src/ts/components/layout/header/Nav.tsx +++ b/frontend/src/ts/components/layout/header/Nav.tsx @@ -149,7 +149,8 @@ export function Nav(): JSXElement {
diff --git a/frontend/src/ts/test/focus.ts b/frontend/src/ts/test/focus.ts index 0908543f6d6d..4ecc6c525d79 100644 --- a/frontend/src/ts/test/focus.ts +++ b/frontend/src/ts/test/focus.ts @@ -19,7 +19,6 @@ let cache: { function initializeCache(): void { if (cacheReady) return; - const cursorSelector = "body, button, a"; const elementsSelector = [ "app", "footer", @@ -33,7 +32,6 @@ function initializeCache(): void { "#ad-footer-small-wrapper", ].join(","); - cache.cursor = qsa(cursorSelector); cache.focus = qsa(elementsSelector); cacheReady = true; @@ -44,6 +42,7 @@ function initializeCache(): void { export function set(value: boolean, withCursor = false): void { requestDebouncedAnimationFrame("focus.set", () => { initializeCache(); + cache.cursor = qsa("body, button, a"); if (value && !getFocus()) { setFocus(true); @@ -52,7 +51,7 @@ export function set(value: boolean, withCursor = false): void { if (cache.focus) { cache.focus.addClass("focus"); } - if (!withCursor && cache.cursor) { + if (!withCursor && cache.cursor !== undefined) { cache.cursor.setStyle({ cursor: "none" }); } @@ -67,7 +66,7 @@ export function set(value: boolean, withCursor = false): void { if (cache.focus) { cache.focus.removeClass("focus"); } - if (cache.cursor) { + if (cache.cursor !== undefined) { cache.cursor.setStyle({ cursor: "" }); }