Repository navigation
Wait for per-URL selectors before accessibility scans - #273
Conversation
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Selector timeout errors bypass Playwright cleanup and leak browser resources.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds per-URL selector waits so client-rendered content is visible before accessibility scans begin.
Changes:
- Adds and validates
waitForSelectors. - Waits up to 30 seconds for configured selectors.
- Adds tests and documentation.
| File | Description |
|---|---|
README.md |
Documents configuration and examples. |
action.yml |
Updates input description. |
.github/actions/find/action.yml |
Updates nested action metadata. |
.github/actions/find/README.md |
Documents the input. |
.github/actions/find/src/types.d.ts |
Extends URL configuration type. |
.github/actions/find/src/index.ts |
Validates selector arrays. |
.github/actions/find/src/findForUrl.ts |
Waits for visible selectors. |
.github/actions/find/tests/index.test.ts |
Tests validation and propagation. |
.github/actions/find/tests/findForUrl.test.ts |
Tests waiting and timeout behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot please address the review comment above - add cleanup if waiting for selectors fails |
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
Fixed in b13eadf. Context and browser cleanup now runs in |
|
passing sandbox workflow: https://github.com/github/accessibility-sandbox/actions/runs/37318784220 |
|
passing scorecard workflow: https://github.com/github/accessibility-scorecard/actions/runs/37319128707 |
For release after the merge of this PR: #273 - will run tests again against v3 branch once merged

This is clone of @mvanhorns's PR #223 - opened with copilot. We need the PR opened in this repo directly so the appropriate tests and validations can run before we merge.
Scans can start before a page’s client-rendered content is ready. This change lets each URL specify elements that must be visible before scanning begins.
waitForSelectorstourl_configs; validate that it’s an array of strings.[{"url":"https://example.com","waitForSelectors":["#app","[data-ready]"]}]