Skip to content

Wait for per-URL selectors before accessibility scans - #273

Merged
abdulahmad307 merged 2 commits into
mainfrom
copilot/open-new-pr-with-changes
Oct 5, 2026
Merged

abdulahmad307 merged 2 commits into
mainfrom
copilot/open-new-pr-with-changes

Conversation

Copilot AI commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Configuration: Add optional waitForSelectors to url_configs; validate that it’s an array of strings.
  • Scanning: Wait up to 30 seconds for each selector after navigation and before collecting findings.
  • Example:
    [{"url":"https://example.com","waitForSelectors":["#app","[data-ready]"]}]

Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
Copilot AI changed the title Add per-URL selector waits before accessibility scans Wait for per-URL selectors before accessibility scans Oct 5, 2026
Copilot AI requested a review from abdulahmad307 October 5, 2026 13:14
@abdulahmad307
abdulahmad307 marked this pull request as ready for review October 5, 2026 13:21
@abdulahmad307
abdulahmad307 requested a review from a team as a code owner October 5, 2026 13:21
Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Selector timeout errors bypass Playwright cleanup and leak browser resources.

Review effort: Balanced
Findings: 1 Medium severity

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.

Comment thread .github/actions/find/src/findForUrl.ts Outdated
@abdulahmad307

Copy link
Copy Markdown
Contributor

@copilot please address the review comment above - add cleanup if waiting for selectors fails

Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>

Copilot AI commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please address the review comment above - add cleanup if waiting for selectors fails

Fixed in b13eadf. Context and browser cleanup now runs in finally when selector waits or navigation fail, while the original error propagates. Browser cleanup is also attempted if context cleanup fails. All 39 find-action tests, lint, formatting, build, and CodeQL checks pass.

@abdulahmad307

Copy link
Copy Markdown
Contributor

@abdulahmad307

Copy link
Copy Markdown
Contributor

@abdulahmad307
abdulahmad307 merged commit cb2eb45 into main Oct 5, 2026
7 checks passed
@abdulahmad307
abdulahmad307 deleted the copilot/open-new-pr-with-changes branch October 5, 2026 17:08
abdulahmad307 added a commit that referenced this pull request Oct 6, 2026
For release after the merge of this PR:
#273 - will run
tests again against v3 branch once merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants