tests: Bypass native ariaNotify in polyfill tests#54
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ariaNotify polyfill in browsers with native support
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ariaNotify polyfill in browsers with native supportCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ariaNotify in polyfill tests
There was a problem hiding this comment.
Pull request overview
This PR updates the test harness to ensure automated tests continue exercising the ariaNotify polyfill even in browsers that ship a native ariaNotify, and aligns browser-backed tests around Chrome/Chromium defaults.
Changes:
- Inject a test-only “bypass native ariaNotify” shim into Web Test Runner HTML tests and Guidepup Playwright contexts.
- Update the polyfill to optionally override native
ariaNotifywhen a test-only global bypass flag is set. - Switch Playwright projects to run against Google Chrome (channel) and simplify test scripts by removing explicit Playwright browser installs.
Show a summary per file
| File | Description |
|---|---|
| web-test-runner.config.js | Injects the bypass shim and polyfill into WTR HTML tests; removes explicit Firefox Playwright launcher setup. |
| tests/guidepup/voiceover.spec.mjs | Adds a shared init script to bypass native ariaNotify for macOS VoiceOver tests. |
| tests/guidepup/nvda.spec.mjs | Adds a shared init script to bypass native ariaNotify for Windows NVDA tests. |
| tests/bypass-native-arianotify.js | New test-only shim that forces failures if tests hit native ariaNotify and sets a bypass flag for the polyfill. |
| playwright.config.mjs | Switches Playwright project to Google Chrome (channel). |
| package.json | Removes explicit playwright install firefox from test scripts. |
| arianotify-polyfill.js | Adds support for a test-only bypass flag and uses defineProperty to override native ariaNotify when requested. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/8 changed files
- Comments generated: 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Native support for
ariaNotifyshipped in Firefox 150.0: https://www.firefox.com/en-US/firefox/150.0/releasenotes/. As a result, our existing tests—running in Firefox—no longer test the polyfill itself.Solution
ariaNotifypolyfill even in browsers with nativeariaNotifysupport, to enable polyfill testing (both Web Test Runner and Guidepup).