-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(axe-4.7): update to use axe-core 4.7.2 (#1061)
#### Details This PR upgrades `axe-core` to 4.7.2 according to the instructions in CONTRIBUTING.md. Additionally, it adds a script that uses `@puppeteer/browsers` to install a specific version of Chrome and move it to the default windows install location, which is expected by `ChromeDriver`. It also adds `@axe-core/cli` to dependabot,yml since we want to include it in axe-core upgrades and not before. ##### Motivation feature work 🚀 ##### Context #### 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:` - [n/a] (if applicable) Addresses issue: #0000 - [n/a] Added relevant unit tests for your changes - [x] Ran `yarn precheckin` - [x] Verified code coverage for the changes made
- Loading branch information
1 parent
6bf708c
commit ab8306b
Showing
18 changed files
with
108,801 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,14 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@puppeteer/browsers": "^1.5.0", | ||
"@types/sarif": ">=2.1.1 <=2.1.4", | ||
"axe-core": "^3.2.2 || ^4.0.0", | ||
"yargs": "^17.0.0" | ||
}, | ||
"devDependencies": { | ||
"@axe-core/cli": "^4.6.0", | ||
"@axe-core/puppeteer": "^4.6.0", | ||
"@axe-core/cli": "^4.7.0", | ||
"@axe-core/puppeteer": "^4.7.0", | ||
"@types/jest": "^27.4.0", | ||
"@types/lodash": "^4.14.136", | ||
"@types/node": "^18.16.2", | ||
|
@@ -44,9 +45,8 @@ | |
"typescript": "^4.0.2" | ||
}, | ||
"resolutions": { | ||
"@axe-core/cli/chromedriver@^109.0.0": "^111.0.0", | ||
"ansi-regex@^4.1.0": "^5.0.1", | ||
"axe-core": "4.6.3" | ||
"axe-core": "4.7.2" | ||
}, | ||
"scripts": { | ||
"prebuild": "yarn clean", | ||
|
@@ -63,7 +63,8 @@ | |
"semantic-release": "semantic-release", | ||
"generate-test-resources": "yarn generate-axe-core-resources && yarn generate-axe-cli-resources", | ||
"generate-axe-cli-resources": "node dist/test-resources/generator/generate-axe-cli-resources.js", | ||
"generate-axe-core-resources": "node dist/test-resources/generator/generate-axe-core-resources.js" | ||
"generate-axe-core-resources": "node dist/test-resources/generator/generate-axe-core-resources.js", | ||
"generate-chrome-resources": "node dist/test-resources/generator/install-chrome-for-webdriver.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[ | ||
{ | ||
"testEngine": { | ||
"name": "axe-core", | ||
"version": "4.7.2" | ||
}, | ||
"testRunner": { | ||
"name": "axe" | ||
}, | ||
"testEnvironment": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/113.0.5672.35 Safari/537.36", | ||
"windowWidth": 800, | ||
"windowHeight": 600, | ||
"orientationAngle": 0, | ||
"orientationType": "landscape-primary" | ||
}, | ||
"timestamp": "2023-08-03T17:39:25.967Z", | ||
"url": "file:///C:/repos/axe-sarif-converter/src/test-resources/basic.html", | ||
"toolOptions": { | ||
"runOnly": { | ||
"type": "rule", | ||
"values": [ | ||
"document-title" | ||
] | ||
}, | ||
"reporter": "v1" | ||
}, | ||
"inapplicable": [], | ||
"passes": [], | ||
"incomplete": [], | ||
"violations": [ | ||
{ | ||
"id": "document-title", | ||
"impact": "serious", | ||
"tags": [ | ||
"cat.text-alternatives", | ||
"wcag2a", | ||
"wcag242", | ||
"ACT", | ||
"TTv5", | ||
"TT12.a" | ||
], | ||
"description": "Ensures each HTML document contains a non-empty <title> element", | ||
"help": "Documents must have <title> element to aid in navigation", | ||
"helpUrl": "https://dequeuniversity.com/rules/axe/4.7/document-title?application=webdriverjs", | ||
"nodes": [ | ||
{ | ||
"any": [ | ||
{ | ||
"id": "doc-has-title", | ||
"data": null, | ||
"relatedNodes": [], | ||
"impact": "serious", | ||
"message": "Document does not have a non-empty <title> element" | ||
} | ||
], | ||
"all": [], | ||
"none": [], | ||
"impact": "serious", | ||
"html": "<html><head></head><body>\n</body></html>", | ||
"target": [ | ||
"html" | ||
], | ||
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[ | ||
{ | ||
"id": "document-title", | ||
"result": "failed", | ||
"pageLevel": false, | ||
"impact": "serious", | ||
"tags": [ | ||
"cat.text-alternatives", | ||
"wcag2a", | ||
"wcag242", | ||
"ACT", | ||
"TTv5", | ||
"TT12.a" | ||
], | ||
"description": "Ensures each HTML document contains a non-empty <title> element", | ||
"help": "Documents must have <title> element to aid in navigation", | ||
"helpUrl": "https://dequeuniversity.com/rules/axe/4.7/document-title?application=axe-puppeteer", | ||
"inapplicable": [], | ||
"passes": [], | ||
"incomplete": [], | ||
"violations": [ | ||
{ | ||
"node": { | ||
"selector": [ | ||
"html" | ||
], | ||
"source": "<html><head></head><body>\n</body></html>", | ||
"xpath": [ | ||
"/html" | ||
], | ||
"ancestry": [ | ||
"html" | ||
], | ||
"nodeIndexes": [ | ||
0 | ||
] | ||
}, | ||
"any": [ | ||
{ | ||
"id": "doc-has-title", | ||
"data": null, | ||
"relatedNodes": [], | ||
"impact": "serious", | ||
"message": "Document does not have a non-empty <title> element" | ||
} | ||
], | ||
"all": [], | ||
"none": [], | ||
"impact": "serious", | ||
"result": "failed" | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"testEngine": { | ||
"name": "axe-core", | ||
"version": "4.7.2" | ||
}, | ||
"testRunner": { | ||
"name": "axe" | ||
}, | ||
"testEnvironment": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4950.0 Safari/537.36", | ||
"windowWidth": 800, | ||
"windowHeight": 600, | ||
"orientationAngle": 0, | ||
"orientationType": "portrait-primary" | ||
}, | ||
"timestamp": "2000-01-02T03:04:05.006Z", | ||
"url": "http://localhost/", | ||
"toolOptions": { | ||
"xpath": true, | ||
"runOnly": { | ||
"type": "rule", | ||
"values": [ | ||
"document-title" | ||
] | ||
}, | ||
"reporter": "v1" | ||
}, | ||
"inapplicable": [], | ||
"passes": [], | ||
"incomplete": [], | ||
"violations": [ | ||
{ | ||
"id": "document-title", | ||
"impact": "serious", | ||
"tags": [ | ||
"cat.text-alternatives", | ||
"wcag2a", | ||
"wcag242", | ||
"ACT", | ||
"TTv5", | ||
"TT12.a" | ||
], | ||
"description": "Ensures each HTML document contains a non-empty <title> element", | ||
"help": "Documents must have <title> element to aid in navigation", | ||
"helpUrl": "https://dequeuniversity.com/rules/axe/4.7/document-title?application=axe-puppeteer", | ||
"nodes": [ | ||
{ | ||
"any": [ | ||
{ | ||
"id": "doc-has-title", | ||
"data": null, | ||
"relatedNodes": [], | ||
"impact": "serious", | ||
"message": "Document does not have a non-empty <title> element" | ||
} | ||
], | ||
"all": [], | ||
"none": [], | ||
"impact": "serious", | ||
"html": "<html><head></head><body>\n</body></html>", | ||
"target": [ | ||
"html" | ||
], | ||
"xpath": [ | ||
"/html" | ||
], | ||
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.