Match axe findings by rule and report all failing elements#240
Open
kzhou314 wants to merge 2 commits into
Open
Match axe findings by rule and report all failing elements#240kzhou314 wants to merge 2 commits into
kzhou314 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves how accessibility scan findings (especially axe violations) are correlated to existing GitHub issues by using a more stable identity (url + ruleId) and expands reporting so a single rule-level issue can include all failing elements on a page.
Changes:
- Add
nodesto axe findings to capture all elements failing a given axe rule. - Update filing/matching logic so axe findings are keyed by
url + ruleIdrather than element HTML. - Update issue body generation and tests to list multiple failing elements for a rule.
Show a summary per file
| File | Description |
|---|---|
| tests/types.d.ts | Extends test-side Finding typing to include per-finding nodes. |
| tests/site-with-errors.test.ts | Adds assertions ensuring axe findings include populated nodes aligned with finding.html. |
| .github/actions/find/tests/findForUrl.test.ts | Adds coverage ensuring axe violations capture all failing nodes into Finding.nodes. |
| .github/actions/find/src/types.d.ts | Extends action Finding typing to include FindingNode[]. |
| .github/actions/find/src/findForUrl.ts | Populates Finding.nodes from axe violation nodes during scanning. |
| .github/actions/file/tests/updateFilingsWithNewFindings.test.ts | Adds tests verifying axe findings remap to existing issues despite HTML shifts. |
| .github/actions/file/tests/generateIssueBody.test.ts | Adds test asserting issue bodies list every failing node when present. |
| .github/actions/file/src/updateFilingsWithNewFindings.ts | Updates axe finding keying to be rule-level (url + ruleId). |
| .github/actions/file/src/types.d.ts | Extends filing-side Finding typing to include per-finding nodes. |
| .github/actions/file/src/generateIssueBody.ts | Refactors “What” section generation to list all failing nodes when available. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/10 changed files
- Comments generated: 2
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.
Closes https://github.com/github/accessibility/issues/10754
Axe findings were fingerprinted on a single element's exact HTML, so a small DOM shift changed the key and re-filed issues that were already tracked. Instead, we match axe findings by
url + ruleIdinstead of HTML, so re-scans re-link to the existing issue even when surrounding markup changes. Moreover, we capture every element that fails a rule (not just the first) and list them all in the issue body.