-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rule): add color-contrast check for unicode characters.
Adding two new config flags to color-contrast so it can check unicode character based icons. ignoreUnicode, defaults to true and retains the behavior of ignoring all unicode characters when doing color contrast. This can be turned off to start checking unicode characters for color contrast. ignoreLength, defaults to false and retains the behavior that single character nodes do not contain enough information to say whether or not they have color contrast issues. This can be turned on to ignore this length check and always check if a node has color contrast issues. Fixes issues described in #1906.
- Loading branch information
Kyle McNutt
authored and
Kyle Bastien
committed
Jan 7, 2020
1 parent
a9506a0
commit 13f7457
Showing
95 changed files
with
2,485 additions
and
554 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "axe-core", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"contributors": [ | ||
{ | ||
"name": "David Sturley", | ||
|
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,38 @@ | ||
const globby = require('globby'); | ||
|
||
const getTestUrls = async (host = `localhost`, port = `9876`) => { | ||
const urls = [ | ||
/** | ||
* Unit tests -> Core | ||
*/ | ||
`http://${host}:${port}/test/core/`, | ||
/** | ||
* Unit tests -> Checks | ||
*/ | ||
`http://${host}:${port}/test/checks/`, | ||
/** | ||
* Unit tests -> Matches | ||
*/ | ||
`http://${host}:${port}/test/rule-matches/`, | ||
/** | ||
* Unit tests -> Commons | ||
*/ | ||
`http://${host}:${port}/test/commons/`, | ||
/** | ||
* Integration tests -> rules | ||
*/ | ||
`http://${host}:${port}/test/integration/rules`, | ||
/** | ||
* Integration tests -> full | ||
*/ | ||
...( | ||
await globby([ | ||
'test/integration/full/**/*.html', | ||
'!test/integration/full/**/frames/**/*.html' | ||
]) | ||
).map(file => `http://${host}:${port}/${file}`) | ||
]; | ||
return urls; | ||
}; | ||
|
||
module.exports = getTestUrls; |
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,26 @@ | ||
/** | ||
* Note: | ||
* For this to be run via `npm run test:headless` ensure server is running | ||
*/ | ||
const getTestUrls = require('./get-test-urls'); | ||
const { runner } = require('mocha-headless-chrome'); | ||
|
||
/** | ||
* Run headless tests | ||
*/ | ||
(async function runTests() { | ||
const testUrls = await getTestUrls(); | ||
for (const url of testUrls) { | ||
const options = { | ||
file: url | ||
}; | ||
const { result } = await runner(options); | ||
|
||
/** | ||
* Stop test execution on failure, for early feedback | ||
*/ | ||
if (result.stats.failures > 0) { | ||
process.exit(1); | ||
} | ||
} | ||
})(); |
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
Oops, something went wrong.