Skip to content

Commit d5afdd2

Browse files
committed
Trim verbose comments
1 parent edc9c3f commit d5afdd2

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

.github/actions/file/src/generateIssueBody.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ ${acceptanceCriteria}
4040
function describeWhat(finding: Finding): string {
4141
const reason = `because ${finding.problemShort}. Learn more about why this was flagged by visiting ${finding.problemUrl}.`
4242

43-
// Axe findings carry every element that failed the rule. List them all so the
44-
// issue reflects the full scope of the violation, not just one example node.
43+
// Axe carries every failing element; list them all, not just the first.
4544
if (finding.nodes && finding.nodes.length > 0) {
4645
const count = finding.nodes.length
4746
const subject = count === 1 ? 'an element' : `${count} elements`

.github/actions/file/src/updateFilingsWithNewFindings.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ function getFilingKey(filing: ResolvedFiling | RepeatedFiling): string {
55
}
66

77
function getFindingKey(finding: Finding): string {
8-
// Axe reports every element failing a rule under a single rule-level finding,
9-
// so the rule itself is the stable identity. Keying on one element's exact
10-
// markup was fragile: any DOM shift produced a new key and re-filed an issue
11-
// that was already tracked. Axe findings therefore key on the rule, not HTML.
8+
// Axe groups every failing element under one rule, so key on the rule, not the
9+
// element's HTML, which shifts with DOM changes and re-files tracked issues.
1210
if (finding.scannerType === 'axe' && finding.ruleId) {
1311
return `${finding.url};axe;${finding.ruleId}`
1412
}

.github/actions/file/tests/updateFilingsWithNewFindings.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ const cachedFiling: RepeatedFiling = {
2525

2626
describe('updateFilingsWithNewFindings', () => {
2727
it('re-matches an axe finding to its existing issue after the element HTML shifts', () => {
28-
// The same rule fails on the same page, but a layout change altered the
29-
// element's surrounding markup. The finding should still map to issue #1
30-
// rather than being treated as a brand new violation.
28+
// Same rule and page, but the element's markup shifted; should still map to issue #1.
3129
const shiftedFinding: Finding = {
3230
...cachedFinding,
3331
html: '<span class="post-meta">old markup wrapped in a new container</span>',

.github/actions/find/src/findForUrl.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ async function runAxeScan({
8585

8686
if (rawFindings) {
8787
for (const violation of rawFindings.violations) {
88-
// Axe groups every element that fails a rule into one violation. Capture
89-
// all of them so a single issue can report the rule's full scope on the
90-
// page, and so matching keys on the rule rather than one element's markup.
88+
// Capture every failing element, not just the first, so one issue covers the rule.
9189
await addFinding({
9290
scannerType: 'axe',
9391
url,

0 commit comments

Comments
 (0)