Skip to content

Commit 381f66f

Browse files
committed
Minor updates for consistency
1 parent 953a7b5 commit 381f66f

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const baseFinding = {
1313

1414
const findingWithEmptyOptionalFields = {
1515
scannerType: 'reflow',
16-
url: 'https://example.com/page',
17-
problemShort: 'elements must meet minimum color contrast ratio thresholds',
18-
problemUrl: 'https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright',
19-
solutionShort: 'ensure the contrast between foreground and background colors meets WCAG thresholds',
16+
url: 'https://example.com/404',
17+
problemShort: 'page requires horizontal scrolling at 320x256 viewport',
18+
problemUrl: 'https://www.w3.org/WAI/WCAG21/Understanding/reflow.html',
19+
solutionShort: 'ensure content is responsive and does not require horizontal scrolling at small viewport sizes',
2020
}
2121

2222
describe('generateIssueBody', () => {

.github/scanner-plugins/reflow-scan/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
export default async function reflowScan({ page, addFinding, url } = {}) {
2-
console.log('reflow plugin');
1+
export default async function reflowScan({page, addFinding, url} = {}) {
32
const originalViewport = page.viewportSize()
43
// Check for horizontal scrolling at 320x256 viewport
54
try {
@@ -15,7 +14,7 @@ export default async function reflowScan({ page, addFinding, url } = {}) {
1514
problemShort: 'page requires horizontal scrolling at 320x256 viewport',
1615
problemUrl: 'https://www.w3.org/WAI/WCAG21/Understanding/reflow.html',
1716
solutionShort: 'ensure content is responsive and does not require horizontal scrolling at small viewport sizes',
18-
solutionLong: `The page has a scroll width of ${scrollWidth}px but a client width of only ${clientWidth}px at 320x256 viewport, requiring horizontal scrolling. This violates WCAG 2.1 Level AA Success Criterion 1.4.10 (Reflow).`,
17+
solutionLong: `The page has a scroll width of ${scrollWidth}px but a client width of only ${clientWidth}px at a 320x256 viewport, requiring horizontal scrolling. This violates WCAG 2.1 Level AA Success Criterion 1.4.10 (Reflow).`,
1918
})
2019
}
2120
} catch (e) {
@@ -28,4 +27,4 @@ export default async function reflowScan({ page, addFinding, url } = {}) {
2827
}
2928
}
3029

31-
export const name = 'reflow-scan';
30+
export const name = 'reflow-scan'

tests/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type Finding = {
22
scannerType: string
3-
ruleId: string
3+
ruleId?: string
44
url: string
55
html?: string
66
problemShort: string

0 commit comments

Comments
 (0)