You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: distinguish WCAG violations from best practices in issue output
Addresses issue #34 - The scanner previously conflated best-practice
recommendations with actual WCAG conformance failures in auto-generated
issue titles and bodies. This led to Copilot filing PRs claiming WCAG
violations when only best-practice rules were triggered.
Changes:
- Add `ruleType` field to Finding type (wcag | best-practice | experimental)
- Extract rule type from axe-core violation tags in findForUrl
- Update issue body generator with clear type badge and description
- Update issue labels: add wcag-violation / best-practice / experimental labels
- Update tests with new label expectations
- Fix ESLint error in test plugin (unused vars)
- Add missing esbuild devDependency
- Include .js files in eslint config
? 'This is a **WCAG conformance failure**. Fixing this issue helps meet WCAG 2.1 accessibility requirements.'
53
+
: 'This is a **best practice recommendation**, not a WCAG conformance failure. Fixing it improves accessibility but is not required for WCAG compliance.'
54
+
}`
55
+
21
56
constacceptanceCriteria=`## Acceptance Criteria
22
-
- [ ] The specific violation reported in this issue is no longer reproducible.
23
-
- [ ] The fix MUST meet WCAG 2.1 guidelines OR the accessibility standards specified by the repository or organization.
24
-
- [ ] A test SHOULD be added to ensure this specific violation does not regress.
57
+
- [ ] The specific issue reported in this issue is no longer reproducible.
58
+
${ruleTypeLabel.isWcag
59
+
? '- [ ] The fix MUST meet WCAG 2.1 guidelines OR the accessibility standards specified by the repository or organization.'
60
+
: '- [ ] The fix SHOULD follow recognized accessibility best practices to improve the user experience.'
61
+
}
62
+
- [ ] A test SHOULD be added to ensure this specific issue does not regress.
25
63
- [ ] This PR MUST NOT introduce any new accessibility issues or regressions.`
26
64
27
-
constbody=`## What
65
+
constbody=`## ${ruleTypeLabel.heading}
28
66
An accessibility scan ${finding.html ? `flagged the element \`${finding.html}\`` : `found an issue on ${finding.url}`} because ${finding.problemShort}. Learn more about why this was flagged by visiting ${finding.problemUrl}.
0 commit comments