Skip to content

Distinguish wcag vs best practice#233

Open
kzhou314 wants to merge 7 commits into
mainfrom
distinguish-wcag-vs-best-practice
Open

Distinguish wcag vs best practice#233
kzhou314 wants to merge 7 commits into
mainfrom
distinguish-wcag-vs-best-practice

Conversation

@kzhou314

Copy link
Copy Markdown

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

  • Classify each Axe finding as wcag, best-practice, or experimental
  • Surface non-WCAG findings in the filed issue: a "Note: …not a hard WCAG failure" line in the body and a best-practice/experimental label.
  • Add two action inputs, file_best_practice_issues and file_experimental_issues (default true), to skip filing those categories

@kzhou314 kzhou314 requested a review from a team as a code owner June 19, 2026 21:19
GitHub Advanced Security started work on behalf of kzhou314 June 19, 2026 21:20 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 19, 2026 21: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.

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, or experimental, and carry that category through the findings pipeline.
  • Surface non-WCAG categorization in filed issues via an issue-body note and a best-practice/experimental label.
  • Add file_best_practice_issues / file_experimental_issues inputs 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

Comment thread .github/actions/file/src/index.ts Outdated
Comment thread .github/actions/file/src/generateIssueBody.ts
@kzhou314 kzhou314 force-pushed the distinguish-wcag-vs-best-practice branch from 8637908 to 7973e5f Compare June 19, 2026 21:35
GitHub Advanced Security started work on behalf of kzhou314 June 19, 2026 21:35 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 19, 2026 21:37
GitHub Advanced Security started work on behalf of kzhou314 June 19, 2026 21:53 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 19, 2026 21:54
@kzhou314 kzhou314 force-pushed the distinguish-wcag-vs-best-practice branch from 8a08d0f to a95cc31 Compare June 19, 2026 21:58
GitHub Advanced Security started work on behalf of kzhou314 June 19, 2026 21:58 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 19, 2026 21:59
GitHub Advanced Security started work on behalf of kzhou314 June 19, 2026 22:05 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 19, 2026 22:06
@kzhou314 kzhou314 requested a review from JoyceZhu June 19, 2026 22:09
GitHub Advanced Security started work on behalf of kzhou314 June 20, 2026 00:20 View session
GitHub Advanced Security finished work on behalf of kzhou314 June 20, 2026 00:22
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.

Consider clearer distinction between wcag error vs best practices

2 participants