Distinguish wcag vs best practice#233
Open
kzhou314 wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a classification layer to Axe-based accessibility findings so the scanner can distinguish hard WCAG-related findings from best-practice and experimental checks, reflect that distinction in filed GitHub issues, and allow skipping issue filing for non-WCAG categories via action inputs.
Changes:
- Categorize Axe violations as
wcag,best-practice, orexperimental, and carry that category through the findings pipeline. - Surface non-WCAG categorization in filed issues via an issue-body note and a
best-practice/experimentallabel. - Add
file_best_practice_issues/file_experimental_issuesinputs and suppress filing (and caching) of new issues in disabled categories.
Show a summary per file
| File | Description |
|---|---|
action.yml |
Adds new top-level action inputs and forwards them into the file sub-action. |
.github/actions/find/tests/findForUrl.test.ts |
Adds unit tests covering Axe tag-to-category mapping behavior. |
.github/actions/find/src/types.d.ts |
Introduces FindingCategory and optional category on Finding for the find action. |
.github/actions/find/src/findForUrl.ts |
Sets category on new Axe findings via categorizeAxeViolation. |
.github/actions/file/tests/openIssue.test.ts |
Adds tests ensuring non-WCAG category labels are applied (and not applied for WCAG). |
.github/actions/file/tests/generateIssueBody.test.ts |
Adds tests for including/omitting the non-WCAG note in issue bodies. |
.github/actions/file/src/types.d.ts |
Introduces FindingCategory and optional category on Finding for the file action. |
.github/actions/file/src/openIssue.ts |
Adds a category label for non-WCAG findings. |
.github/actions/file/src/index.ts |
Adds new inputs and gates filing of new issues by category; suppresses disabled-category filings from the output/cache. |
.github/actions/file/src/generateIssueBody.ts |
Adds a non-WCAG note to issue bodies for best-practice/experimental findings. |
.github/actions/file/action.yml |
Exposes the new category-gating inputs on the file action itself. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 9/11 changed files
- Comments generated: 2
8637908 to
7973e5f
Compare
8a08d0f to
a95cc31
Compare
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 #34 (which closes https://github.com/github/accessibility/issues/10749)
Problem
Every finding was filed as if it were a hard WCAG failure, with no way to differentiate definitive violations and best-practice or experimental checks. There was also no way to stop filing the non-WCAG ones.
Changes
wcag,best-practice, orexperimentalbest-practice/experimentallabel.file_best_practice_issuesandfile_experimental_issues(defaulttrue), to skip filing those categories