[test] Add Guidepup screen reader tests - #5328
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,097.34 ms +87.82 ms(+8.7%) | Renders: 92 (+0) | Paint: 1,808.21 ms +133.74 ms(+8.0%)
13 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| @@ -0,0 +1,38 @@ | |||
| import { expect } from '@playwright/test'; | |||
| import { screenReaderTest as test, type ScreenReaderPlaywright } from '@guidepup/playwright'; | |||
There was a problem hiding this comment.
screenReaderTest automatically uses VoiceOver or NVDA depending on the OS.
|
|
||
| const MAX_NAVIGATION_STEPS = 10; | ||
|
|
||
| async function navigateToItem( |
There was a problem hiding this comment.
This helper should be extracted as we see fit.
010845f to
598c4ba
Compare
| sharp: true | ||
| unrs-resolver: true | ||
|
|
||
| # Screen recording is not needed for the tests and pulls in ffmpeg-static. |
There was a problem hiding this comment.
PR reviewNothing is merge-blocking, but two test-infrastructure risks and one documentation gap are worth addressing. Installation, formatting, ESLint, project typechecking, and Playwright discovery passed; the historical Windows/NVDA test passed, but VoiceOver was not run because setup modifies macOS accessibility settings. The PR also conflicts with current Bugs (2)1. 🟠 Refresh the Guidepup versions before relying on macOS supportLocation: "@guidepup/guidepup": "0.29.2",
"@guidepup/playwright": "0.18.0",
"@guidepup/setup": "0.24.1",These versions predate several fixes directly affecting the newly documented macOS workflow:
Failure scenario: A contributor follows the README, but VoiceOver remains outside the fixture, a transient TCC lock leaves setup incomplete, or an interrupted run leaves VoiceOver and its mounted preferences active. Fix: Coordinately update to 2. 🟠 Allow enough time for Guidepup’s supported retry pathLocation: timeout: 60_000,The successful Windows job already took 49.5 seconds, leaving little margin. Guidepup’s own example configuration uses a five-minute timeout and one retry because screen-reader startup, application focus, and navigation contain multiple OS-level waits and retries. Failure scenario: A cold or loaded Windows runner takes slightly longer to start NVDA or focus Chrome, causing Playwright to terminate an otherwise recoverable test at 60 seconds. Fix: Use the upstream five-minute timeout and consider its single-retry configuration; the surrounding job already has a 15-minute limit. Docs (1)1. 🟡 Document or control the required screen-reader languageLocation: Screen reader tests use Guidepup ... with VoiceOver on macOS or NVDA on Windows.The test asserts the English word Failure scenario: VoiceOver or NVDA uses a non-English language and rejects a correctly exposed radio because its localized role announcement does not contain “radio,” or navigation cannot find the localized web-content entry. Fix: Configure a stable English screen-reader profile, make expectations locale-aware, or explicitly document English as a prerequisite. VerdictApprove after nits - no blocking regression, but the stale Guidepup pins and tight timeout should be corrected during the required rebase. 🤖 Review generated with Codex |
598c4ba to
fe0341c
Compare
|
@michaldudak all comments addressed. CI is failing because we have a policy to only allow deps older than 72h. |
2cfc47c to
be09ab5
Compare
62c8d7e to
48b357c
Compare
|
@michaldudak deps now comply with the 72h policy. |
Adds a minimal Guidepup screen-reader test using the existing Radio fixture, with local VoiceOver support and Windows/NVDA CI coverage. No VoiceOver CI coverage for now.
CI run: https://github.com/mui/base-ui/actions/runs/30082080229/job/89445735040?pr=5328