Skip to content

Commit 24ef1fe

Browse files
feat(axe-core-4.9.1): update to use axe-core 4.9.1 (#1322)
#### Details This PR upgrades axe-core to 4.9.1 according to the instructions in CONTRIBUTING.md. ##### Motivation feature work 🚀 ##### Context <!-- Are there any parts that you've intentionally left out-of-scope for a later PR to handle? --> <!-- Were there any alternative approaches you considered? What tradeoffs did you consider? --> #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] PR title respects [Conventional Commits](https://www.conventionalcommits.org) (starts with `fix:`, `feat:`, etc, and is suitable for user-facing release notes) - [x] PR contains no breaking changes, **OR** description of both PR **and final merge commit** starts with `BREAKING CHANGE:` - [x] Verify PR title and final merge commit contain space after `:` for example `feat(feature): feature title` otherwise it will not be considered by semantic-release for release. - [ ] (if applicable) Addresses issue: #0000 - [ ] Added relevant unit tests for your changes - [x] Ran `yarn precheckin` - [x] Verified code coverage for the changes made --------- Co-authored-by: Madalyn <[email protected]>
1 parent 6354f73 commit 24ef1fe

15 files changed

+108168
-45
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"yargs": "^17.0.0"
2323
},
2424
"devDependencies": {
25-
"@axe-core/cli": "^4.8.0",
26-
"@axe-core/puppeteer": "^4.8.0",
25+
"@axe-core/cli": "^4.9.0",
26+
"@axe-core/puppeteer": "^4.9.0",
2727
"@types/jest": "^27.4.0",
2828
"@types/lodash": "^4.14.136",
2929
"@types/node": "^18.16.2",
@@ -46,7 +46,7 @@
4646
},
4747
"resolutions": {
4848
"ansi-regex@^4.1.0": "^5.0.1",
49-
"axe-core": "4.8.4",
49+
"axe-core": "4.9.1",
5050
"chromedriver": "^119.0.1"
5151
},
5252
"scripts": {

src/__snapshots__/index.test.ts.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -1388,15 +1388,15 @@ Object {
13881388
],
13891389
"tool": Object {
13901390
"driver": Object {
1391-
"downloadUri": "https://www.npmjs.com/package/axe-core/v/4.8.4",
1392-
"fullName": "axe for Web v4.8.4",
1391+
"downloadUri": "https://www.npmjs.com/package/axe-core/v/4.9.1",
1392+
"fullName": "axe for Web v4.9.1",
13931393
"informationUri": "https://www.deque.com/axe/axe-for-web/",
13941394
"name": "axe-core",
13951395
"properties": Object {
13961396
"microsoft/qualityDomain": "Accessibility",
13971397
},
13981398
"rules": Array [],
1399-
"semanticVersion": "4.8.4",
1399+
"semanticVersion": "4.9.1",
14001400
"shortDescription": Object {
14011401
"text": "An open source accessibility rules library for automated testing.",
14021402
},
@@ -1407,7 +1407,7 @@ Object {
14071407
"name": "WCAG",
14081408
},
14091409
],
1410-
"version": "4.8.4",
1410+
"version": "4.9.1",
14111411
},
14121412
},
14131413
},

src/cli.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ describe('axe-sarif-converter CLI', () => {
8383
${'w3citylights-axe-v4.8.4.axe-cli-v4.8.5.json'}
8484
${'basic-axe-v4.8.4.axe-cli-v4.9.0.json'}
8585
${'w3citylights-axe-v4.8.4.axe-cli-v4.9.0.json'}
86+
${'basic-axe-v4.9.1.axe-cli-v4.9.1.json'}
87+
${'w3citylights-axe-v4.9.1.axe-cli-v4.9.1.json'}
8688
`(
8789
'supports conversion from axe-cli output $inputFile',
8890
async ({ inputFile }) => {
@@ -204,11 +206,11 @@ describe('axe-sarif-converter CLI', () => {
204206
const testResultsDir = path.join(__dirname, '..', 'test-results');
205207
const basicAxeV2File = path.join(
206208
testResourcesDir,
207-
'basic-axe-v4.8.4.reporter-v2.json',
209+
'basic-axe-v4.9.1.reporter-v2.json',
208210
);
209211
const basicSarifFile = path.join(
210212
testResourcesDir,
211-
'basic-axe-v4.8.4.sarif',
213+
'basic-axe-v4.9.1.sarif',
212214
);
213215

214216
const mkdir = promisify(fs.mkdir);

src/index.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ describe('public convertAxeToSarif API', () => {
119119
${'basic-axe-v4.8.4.reporter-v2.json'} | ${'basic-axe-v4.8.4.sarif'}
120120
${'w3citylights-axe-v4.8.4.reporter-v1.json'} | ${'w3citylights-axe-v4.8.4.sarif'}
121121
${'w3citylights-axe-v4.8.4.reporter-v2.json'} | ${'w3citylights-axe-v4.8.4.sarif'}
122+
${'basic-axe-v4.9.1.reporter-v1.json'} | ${'basic-axe-v4.9.1.sarif'}
123+
${'basic-axe-v4.9.1.reporter-v2.json'} | ${'basic-axe-v4.9.1.sarif'}
124+
${'w3citylights-axe-v4.9.1.reporter-v1.json'} | ${'w3citylights-axe-v4.9.1.sarif'}
125+
${'w3citylights-axe-v4.9.1.reporter-v2.json'} | ${'w3citylights-axe-v4.9.1.sarif'}
122126
`(
123127
'converts pinned v1/v2 input $inputFile to pinned output $outputFile',
124128
({ inputFile, outputFile }) => {
@@ -165,7 +169,7 @@ describe('public sarifReporter API', () => {
165169
// it isn't very meaningful to test cases that involve old axe versions here.
166170
it.each`
167171
inputFile | outputFile
168-
${'basic-axe-v4.8.4.reporter-raw.json'} | ${'basic-axe-v4.8.4.sarif'}
172+
${'basic-axe-v4.9.1.reporter-raw.json'} | ${'basic-axe-v4.9.1.sarif'}
169173
`(
170174
'converts pinned raw input $inputFile to pinned output $outputFile',
171175
async ({ inputFile, outputFile }) => {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[
2+
{
3+
"testEngine": {
4+
"name": "axe-core",
5+
"version": "4.9.1"
6+
},
7+
"testRunner": {
8+
"name": "axe"
9+
},
10+
"testEnvironment": {
11+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/119.0.6045.105 Safari/537.36",
12+
"windowWidth": 800,
13+
"windowHeight": 600,
14+
"orientationAngle": 0,
15+
"orientationType": "landscape-primary"
16+
},
17+
"timestamp": "2024-06-19T05:14:53.272Z",
18+
"url": "file:///C:/Users/v-rtarpara/Rohit/Projects/fork/axe-sarif-converter/src/test-resources/basic.html",
19+
"toolOptions": {
20+
"runOnly": {
21+
"type": "rule",
22+
"values": [
23+
"document-title"
24+
]
25+
},
26+
"reporter": "v1"
27+
},
28+
"inapplicable": [],
29+
"passes": [],
30+
"incomplete": [],
31+
"violations": [
32+
{
33+
"id": "document-title",
34+
"impact": "serious",
35+
"tags": [
36+
"cat.text-alternatives",
37+
"wcag2a",
38+
"wcag242",
39+
"TTv5",
40+
"TT12.a",
41+
"EN-301-549",
42+
"EN-9.2.4.2",
43+
"ACT"
44+
],
45+
"description": "Ensures each HTML document contains a non-empty <title> element",
46+
"help": "Documents must have <title> element to aid in navigation",
47+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=webdriverjs",
48+
"nodes": [
49+
{
50+
"any": [
51+
{
52+
"id": "doc-has-title",
53+
"data": null,
54+
"relatedNodes": [],
55+
"impact": "serious",
56+
"message": "Document does not have a non-empty <title> element"
57+
}
58+
],
59+
"all": [],
60+
"none": [],
61+
"impact": "serious",
62+
"html": "<html><head></head><body>\n</body></html>",
63+
"target": [
64+
"html"
65+
],
66+
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element"
67+
}
68+
]
69+
}
70+
]
71+
}
72+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[
2+
{
3+
"id": "document-title",
4+
"result": "failed",
5+
"pageLevel": false,
6+
"impact": "serious",
7+
"tags": [
8+
"cat.text-alternatives",
9+
"wcag2a",
10+
"wcag242",
11+
"TTv5",
12+
"TT12.a",
13+
"EN-301-549",
14+
"EN-9.2.4.2",
15+
"ACT"
16+
],
17+
"description": "Ensures each HTML document contains a non-empty <title> element",
18+
"help": "Documents must have <title> element to aid in navigation",
19+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
20+
"inapplicable": [],
21+
"passes": [],
22+
"incomplete": [],
23+
"violations": [
24+
{
25+
"any": [
26+
{
27+
"id": "doc-has-title",
28+
"data": null,
29+
"impact": "serious",
30+
"message": "Document does not have a non-empty <title> element",
31+
"relatedNodes": []
32+
}
33+
],
34+
"all": [],
35+
"none": [],
36+
"impact": "serious",
37+
"result": "failed",
38+
"node": {
39+
"selector": [
40+
"html"
41+
],
42+
"source": "<html><head></head><body>\n</body></html>",
43+
"xpath": [
44+
"/html"
45+
],
46+
"ancestry": [
47+
"html"
48+
],
49+
"nodeIndexes": [
50+
0
51+
],
52+
"fromFrame": false
53+
}
54+
}
55+
]
56+
}
57+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"testEngine": {
3+
"name": "axe-core",
4+
"version": "4.9.1"
5+
},
6+
"testRunner": {
7+
"name": "axe"
8+
},
9+
"testEnvironment": {
10+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4950.0 Safari/537.36",
11+
"windowWidth": 800,
12+
"windowHeight": 600,
13+
"orientationAngle": 0,
14+
"orientationType": "portrait-primary"
15+
},
16+
"timestamp": "2000-01-02T03:04:05.006Z",
17+
"url": "http://localhost/",
18+
"toolOptions": {
19+
"xpath": true,
20+
"runOnly": {
21+
"type": "rule",
22+
"values": [
23+
"document-title"
24+
]
25+
},
26+
"reporter": "v1"
27+
},
28+
"inapplicable": [],
29+
"passes": [],
30+
"incomplete": [],
31+
"violations": [
32+
{
33+
"id": "document-title",
34+
"impact": "serious",
35+
"tags": [
36+
"cat.text-alternatives",
37+
"wcag2a",
38+
"wcag242",
39+
"TTv5",
40+
"TT12.a",
41+
"EN-301-549",
42+
"EN-9.2.4.2",
43+
"ACT"
44+
],
45+
"description": "Ensures each HTML document contains a non-empty <title> element",
46+
"help": "Documents must have <title> element to aid in navigation",
47+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
48+
"nodes": [
49+
{
50+
"any": [
51+
{
52+
"id": "doc-has-title",
53+
"data": null,
54+
"relatedNodes": [],
55+
"impact": "serious",
56+
"message": "Document does not have a non-empty <title> element"
57+
}
58+
],
59+
"all": [],
60+
"none": [],
61+
"impact": "serious",
62+
"html": "<html><head></head><body>\n</body></html>",
63+
"target": [
64+
"html"
65+
],
66+
"xpath": [
67+
"/html"
68+
],
69+
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element"
70+
}
71+
]
72+
}
73+
]
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"testEngine": {
3+
"name": "axe-core",
4+
"version": "4.9.1"
5+
},
6+
"testRunner": {
7+
"name": "axe"
8+
},
9+
"testEnvironment": {
10+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4950.0 Safari/537.36",
11+
"windowWidth": 800,
12+
"windowHeight": 600,
13+
"orientationAngle": 0,
14+
"orientationType": "portrait-primary"
15+
},
16+
"timestamp": "2000-01-02T03:04:05.006Z",
17+
"url": "http://localhost/",
18+
"toolOptions": {
19+
"xpath": true,
20+
"runOnly": {
21+
"type": "rule",
22+
"values": [
23+
"document-title"
24+
]
25+
},
26+
"reporter": "v2"
27+
},
28+
"inapplicable": [],
29+
"passes": [],
30+
"incomplete": [],
31+
"violations": [
32+
{
33+
"id": "document-title",
34+
"impact": "serious",
35+
"tags": [
36+
"cat.text-alternatives",
37+
"wcag2a",
38+
"wcag242",
39+
"TTv5",
40+
"TT12.a",
41+
"EN-301-549",
42+
"EN-9.2.4.2",
43+
"ACT"
44+
],
45+
"description": "Ensures each HTML document contains a non-empty <title> element",
46+
"help": "Documents must have <title> element to aid in navigation",
47+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
48+
"nodes": [
49+
{
50+
"any": [
51+
{
52+
"id": "doc-has-title",
53+
"data": null,
54+
"relatedNodes": [],
55+
"impact": "serious",
56+
"message": "Document does not have a non-empty <title> element"
57+
}
58+
],
59+
"all": [],
60+
"none": [],
61+
"impact": "serious",
62+
"html": "<html><head></head><body>\n</body></html>",
63+
"target": [
64+
"html"
65+
],
66+
"xpath": [
67+
"/html"
68+
]
69+
}
70+
]
71+
}
72+
]
73+
}

0 commit comments

Comments
 (0)