From d31c52ee5c759f2497819f57ddd846f768936a92 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 30 Oct 2026 12:28:39 +0100 Subject: [PATCH] Make the speaker view Layout test pass on macOS The test pressed ArrowDown on the focused Layout select and expected the value to become wide. On macOS, Chromium, WebKit and Firefox all open the popup on ArrowDown or ArrowUp over a closed select instead of changing the value (Blink and WebKit through PopsMenuByArrowKeys on the Mac theme, Gecko through its XP_MACOSX branch in HTMLSelectEventListener). The value stayed default, so the nightly macOS Playwright job failed in all three browsers while Linux and Windows passed. The test checks two things that do not need the same key. The value, its visible label and the accessible name are now set and checked with selectOption. The arrow key press stays, followed by the existing check that the deck does not move, without asserting the value afterwards. The keydown still reaches the select on macOS, so the speaker view's guard against forwarding keys from native controls is still exercised there. Removing that guard from the rendered speaker view makes the test fail on the deck position check in chromium, firefox and webkit, so the remaining assertion still catches the regression it was written for. This is a characterization fix: no macOS runner was available locally, and the macOS result will come from the next nightly run. --- .../playwright/tests/revealjs-speaker-view-a11y.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/playwright/tests/revealjs-speaker-view-a11y.spec.ts b/tests/integration/playwright/tests/revealjs-speaker-view-a11y.spec.ts index 34fee9da18a..8363bae4b74 100644 --- a/tests/integration/playwright/tests/revealjs-speaker-view-a11y.spec.ts +++ b/tests/integration/playwright/tests/revealjs-speaker-view-a11y.spec.ts @@ -21,10 +21,13 @@ test.describe('revealjs speaker view accessibility (#15159, #15160)', () => { const indices = await page.evaluate(() => (window as any).Reveal.getIndices()); await select.focus(); await expect(speaker.locator('#speaker-layout')).toHaveCSS('outline-style', 'solid'); - await select.press('ArrowDown'); + await select.selectOption('wide'); await expect(select).toHaveValue('wide'); await expect(speaker.locator('.speaker-layout-value')).toHaveText(': Wide'); await expect(select).toHaveAccessibleName('Layout'); + // Arrow keys on a closed select open the popup on macOS and change the + // value elsewhere, so only the deck position is checked after the press. + await select.press('ArrowDown'); // Speaker-to-deck state forwarding is debounced by 500 ms. Check after // that window so a select arrow key cannot silently advance the deck. The // first slide has a fragment, so compare the fragment index too.