Add url_configs input to skip CSS selectors per URL from Axe scan#213
Add url_configs input to skip CSS selectors per URL from Axe scan#213
url_configs input to skip CSS selectors per URL from Axe scan#213Conversation
Agent-Logs-Url: https://github.com/github/accessibility-scanner/sessions/13d504eb-d5cb-4e30-994f-b988560b788d Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
exclude input to skip CSS selectors from Axe scan
|
Actually, I don't think this is the right approach. It would make more sense if each page/url had its own exclude list. We might want to introduce a new |
|
@copilot please adjust this PR with the following:
|
…sion Agent-Logs-Url: https://github.com/github/accessibility-scanner/sessions/3565f54a-5878-479d-8bcd-ef2b85413be6 Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
Done in commit 88d20c3. Here's a summary of the changes:
|
exclude input to skip CSS selectors from Axe scanurl_config input to skip CSS selectors per URL from Axe scan
- refactor input loading to keep main function scope limited and easier to read - change url_config to url_configs - change some ternaries and conditional logic from copilot to be easier to understand
7a6f9fd to
0f88383
Compare
url_config input to skip CSS selectors per URL from Axe scanurl_configs input to skip CSS selectors per URL from Axe scan
Tracking issue with context: #212
Embedded iframes, third-party widgets, and user-generated content often should not be scanned. This adds a
url_configsinput — a stringified JSON array of objects each with aurlfield and an optionalexcludeSelectorsfield — that allows per-URL CSS selector exclusion viaAxeBuilder.exclude()beforeanalyze()is called. Whenurl_configsis provided, it takes precedence over theurlsinput.Changes
action.yml(root) — Newurl_configsinput;urlsis now optional (required whenurl_configsis not provided); both forwarded to thefindstep.github/actions/find/action.yml— Newurl_configsinput declared;urlsmade optionalfind/src/types.d.ts— NewUrlConfigtype:{ url: string; excludeSelectors?: string[] }find/src/index.ts— Parses and validatesurl_configsJSON; when present, uses it instead ofurls; passes each URL'sexcludeSelectorstofindForUrlfind/src/findForUrl.ts—findForUrlandrunAxeScanacceptexclude?: string[]; selectors applied viaaxeBuilder.exclude()beforeanalyze()README.md—url_configsinput documented in the inputs table and getting-started example;urlsmarked as conditionally requiredUsage
The
urlsinput continues to work as before whenurl_configsis not provided.