Skip to content

Commit 80fce3c

Browse files
Test how Copilot performs when we add normative language and acceptance criteria to the issue description (#950)
### What I want to provide a clear checklist for Copilot to follow when remediating these Axe issues. I also am opting to test normative language `Must` `SHOULD` `MUST NOT`. My understanding is these methods help AI focus and produce more tailored responses.
2 parents a98b327 + fbc8f8c commit 80fce3c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/actions/file/src/openIssueForFinding.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ export async function openIssueForFinding(octokit: Octokit, repoWithOwner: strin
3131
: line
3232
)
3333
.join("\n");
34-
const body = `
34+
const acceptanceCriteria = `## Acceptance Criteria
35+
- [ ] The specific axe violation reported in this issue is no longer reproducible.
36+
- [ ] The fix MUST meet WCAG 2.1 guidelines OR the accessibility standards specified by the repository or organization.
37+
- [ ] A test SHOULD be added to ensure this specific axe violation does not regress.
38+
- [ ] This PR MUST NOT introduce any new accessibility issues or regressions.
39+
`
40+
41+
const body = `## What
3542
An accessibility scan flagged the element \`${finding.html}\` on ${finding.url} because ${finding.problemShort}. Learn more about why this was flagged by visiting ${finding.problemUrl}.
3643
3744
To fix this, ${finding.solutionShort}.
3845
${solutionLong ? `\nSpecifically:\n\n${solutionLong}` : ''}
46+
47+
${acceptanceCriteria}
3948
`;
4049

4150
return octokit.request(`POST /repos/${owner}/${repo}/issues`, {
@@ -46,4 +55,4 @@ ${solutionLong ? `\nSpecifically:\n\n${solutionLong}` : ''}
4655
labels
4756
});
4857
}
49-
}
58+
}

0 commit comments

Comments
 (0)