-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into aria-braille-equivalent
- Loading branch information
Showing
17 changed files
with
306 additions
and
85 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
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,13 @@ | ||
{ | ||
"id": "aria-conditional-attr", | ||
"matches": "aria-allowed-attr-matches", | ||
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"], | ||
"actIds": ["5c01ea"], | ||
"metadata": { | ||
"description": "Ensures ARIA attributes are used as described in the specification of the element's role", | ||
"help": "ARIA attributes must be used as specified for the element's role" | ||
}, | ||
"all": ["aria-conditional-attr"], | ||
"any": [], | ||
"none": [] | ||
} |
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,45 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Test Page</title> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="/node_modules/mocha/mocha.css" | ||
/> | ||
<script src="/node_modules/mocha/mocha.js"></script> | ||
<script src="/node_modules/chai/chai.js"></script> | ||
<script src="/axe.js"></script> | ||
<script> | ||
mocha.setup({ | ||
timeout: 2000, | ||
ui: 'bdd' | ||
}); | ||
var assert = chai.assert; | ||
</script> | ||
<script src="/test/integration/no-ui-reporter.js"></script> | ||
<style> | ||
* { | ||
box-sizing: border-box; | ||
} | ||
html, | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
height: 100%; | ||
background: #fff; | ||
color: #000; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="fixture"> | ||
<div style="overflow: hidden; width: 200px; height: 200px"> | ||
<!-- browsers each have their own CSS size limit so this number (which should be greater than the limit) will be capped to that --> | ||
<div style="width: 1e9px; height: 1e9px">Hello World</div> | ||
</div> | ||
</div> | ||
<script src="memory.js"></script> | ||
<script src="/test/integration/adapter.js"></script> | ||
</body> | ||
</html> |
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,18 @@ | ||
/* | ||
Since we can't easily test for memory issue we'll assume that if this test doesn't time out then the memory issue isn't a problem | ||
*/ | ||
describe('color-contrast memory test', () => { | ||
describe('violations', () => { | ||
it('should find none', done => { | ||
axe.run( | ||
'#fixture', | ||
{ runOnly: { type: 'rule', values: ['color-contrast'] } }, | ||
(err, results) => { | ||
assert.isNull(err); | ||
assert.lengthOf(results.violations, 0); | ||
done(); | ||
} | ||
); | ||
}); | ||
}); | ||
}); |
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,22 +1,5 @@ | ||
{ | ||
"description": "aria-allowed-attr failing tests", | ||
"rule": "aria-allowed-attr", | ||
"violations": [ | ||
["#fail1"], | ||
["#fail2"], | ||
["#fail3"], | ||
["#fail4"], | ||
["#fail5"], | ||
["#fail6"], | ||
["#fail7"], | ||
["#fail8"], | ||
["#fail9"], | ||
["#fail10"], | ||
["#fail11"], | ||
["#fail12"], | ||
["#fail13"], | ||
["#fail14"], | ||
["#fail15"], | ||
["#fail16"] | ||
] | ||
"violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"], ["#fail5"]] | ||
} |
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
32 changes: 32 additions & 0 deletions
32
test/integration/rules/aria-conditional-attr/aria-conditional-attr.html
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,32 @@ | ||
<input type="checkbox" aria-checked="false" id="pass1" /> | ||
<input type="checkbox" aria-checked="true" checked id="pass2" /> | ||
<table role="treegrid"> | ||
<tr | ||
id="pass3" | ||
role="row" | ||
aria-level="1" | ||
aria-posinset="1" | ||
aria-setsize="1" | ||
aria-expanded="true" | ||
> | ||
<td role="gridcell">Treegrids are awesome</td> | ||
</tr> | ||
</table> | ||
|
||
<div role="table"> | ||
<div role="row" aria-expanded="false" id="fail1"></div> | ||
<div role="row" aria-posinset="1" id="fail2"></div> | ||
<div role="row" aria-setsize="10" id="fail3"></div> | ||
<div role="row" aria-level="1" id="fail4"></div> | ||
</div> | ||
|
||
<div role="grid"> | ||
<div role="row" aria-expanded="false" id="fail5"></div> | ||
<div role="row" aria-posinset="1" id="fail6"></div> | ||
<div role="row" aria-setsize="10" id="fail7"></div> | ||
<div role="row" aria-level="1" id="fail8"></div> | ||
</div> | ||
|
||
<input type="checkbox" aria-checked="mixed" id="fail9" /> | ||
<input type="checkbox" aria-checked="true" id="fail10" /> | ||
<input type="checkbox" aria-checked="false" checked id="fail11" /> |
18 changes: 18 additions & 0 deletions
18
test/integration/rules/aria-conditional-attr/aria-conditional-attr.json
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,18 @@ | ||
{ | ||
"description": "aria-conditional-attr tests", | ||
"rule": "aria-conditional-attr", | ||
"passes": [["#pass1"], ["#pass2"], ["#pass3"]], | ||
"violations": [ | ||
["#fail1"], | ||
["#fail2"], | ||
["#fail3"], | ||
["#fail4"], | ||
["#fail5"], | ||
["#fail6"], | ||
["#fail7"], | ||
["#fail8"], | ||
["#fail9"], | ||
["#fail10"], | ||
["#fail11"] | ||
] | ||
} |
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.