-
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.
fix: add noHtml to axe.configure (#2789)
* fix: add noHtml to axe.configure * docs * Update lib/core/utils/dq-element.js Co-authored-by: Wilco Fiers <[email protected]> * Update lib/core/utils/dq-element.js Co-authored-by: Stephen Mathieson <[email protected]> * tests Co-authored-by: Wilco Fiers <[email protected]> Co-authored-by: Stephen Mathieson <[email protected]>
- Loading branch information
1 parent
aeb044c
commit 5c8dec8
Showing
9 changed files
with
226 additions
and
7 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
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,52 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<title>Context Fixture</title> | ||
</head> | ||
<body> | ||
<div id="foo"> | ||
<div id="bar"></div> | ||
</div> | ||
<div id="target"></div> | ||
<script src="/axe.js"></script> | ||
<script> | ||
axe._load({ | ||
rules: [ | ||
{ | ||
id: 'div#target', | ||
selector: '#target', | ||
any: ['has-target'] | ||
}, | ||
{ | ||
id: 'first-div', | ||
selector: 'div', | ||
any: ['first-div'] | ||
} | ||
], | ||
checks: [ | ||
{ | ||
id: 'has-target', | ||
evaluate: function() { | ||
return true; | ||
} | ||
}, | ||
{ | ||
id: 'first-div', | ||
evaluate: function(node) { | ||
this.relatedNodes([node]); | ||
return false; | ||
}, | ||
after: function(results) { | ||
if (results.length) { | ||
results[0].result = true; | ||
} | ||
return [results[0]]; | ||
} | ||
} | ||
], | ||
messages: {} | ||
}); | ||
axe.configure({ noHtml: true }); | ||
</script> | ||
</body> | ||
</html> |