Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/actions/find/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/find/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "module",
"dependencies": {
"@actions/core": "^1.11.1",
"@axe-core/playwright": "^4.10.2",
"@axe-core/playwright": "^4.11.0",
"playwright": "^1.56.1"
},
"devDependencies": {
Expand Down
12 changes: 5 additions & 7 deletions tests/site-with-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ describe("site-with-errors", () => {

it("cache has expected results", () => {
const actual = results.map(({ issue: { url: issueUrl }, pullRequest: { url: pullRequestUrl }, findings }) => {
const { solutionLong, ...finding } = findings[0];
const { problemUrl, solutionLong, ...finding } = findings[0];
// Check volatile fields for existence only
expect(issueUrl).toBeDefined();
expect(pullRequestUrl).toBeDefined();
expect(problemUrl).toBeDefined();
expect(solutionLong).toBeDefined();
// Check `problemUrl`, ignoring axe version
expect(problemUrl.startsWith("https://dequeuniversity.com/rules/axe/")).toBe(true);
expect(problemUrl.endsWith(`/${finding.ruleId}?application=playwright`)).toBe(true);
return finding;
});
const expected = [
Expand All @@ -30,15 +34,13 @@ describe("site-with-errors", () => {
url: "http://127.0.0.1:4000/",
html: '<span class="post-meta">Jul 30, 2025</span>',
problemShort: "elements must meet minimum color contrast ratio thresholds",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
ruleId: "color-contrast",
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds"
}, {
scannerType: "axe",
url: "http://127.0.0.1:4000/",
html: '<html lang="en">',
problemShort: "page should contain a level-one heading",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/page-has-heading-one?application=playwright",
ruleId: "page-has-heading-one",
solutionShort: "ensure that the page, or at least one of its frames contains a level-one heading"
}, {
Expand All @@ -47,31 +49,27 @@ describe("site-with-errors", () => {
html: `<time class="dt-published" datetime="2025-07-30T17:32:33+00:00" itemprop="datePublished">Jul 30, 2025
</time>`,
problemShort: "elements must meet minimum color contrast ratio thresholds",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
ruleId: "color-contrast",
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds",
}, {
scannerType: "axe",
url: "http://127.0.0.1:4000/about/",
html: '<a href="https://jekyllrb.com/">jekyllrb.com</a>',
problemShort: "elements must meet minimum color contrast ratio thresholds",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
ruleId: "color-contrast",
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds",
}, {
scannerType: "axe",
url: "http://127.0.0.1:4000/404.html",
html: '<li class="p-name">Accessibility Scanner Demo</li>',
problemShort: "elements must meet minimum color contrast ratio thresholds",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
ruleId: "color-contrast",
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds"
}, {
scannerType: "axe",
url: "http://127.0.0.1:4000/404.html",
html: '<h1 class="post-title"></h1>',
problemShort: "headings should not be empty",
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/empty-heading?application=playwright",
ruleId: "empty-heading",
solutionShort: "ensure headings have discernible text",
},
Expand Down