-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
743775d
commit 403b502
Showing
36 changed files
with
470 additions
and
462 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
describe('aria-allowed-role-matches', function () { | ||
'use strict'; | ||
|
||
let queryFixture = axe.testUtils.queryFixture; | ||
const queryFixture = axe.testUtils.queryFixture; | ||
let rule; | ||
|
||
beforeEach(function () { | ||
rule = axe.utils.getRule('aria-allowed-role'); | ||
}); | ||
|
||
it('return false (no matches) for a <link> with a href to have any invalid role', function () { | ||
let vNode = queryFixture( | ||
const vNode = queryFixture( | ||
'<link id="target" href="/example.com" role="invalid-role"></link>' | ||
); | ||
assert.isFalse(rule.matches(null, vNode)); | ||
}); | ||
|
||
it('return true for input with redundant role', function () { | ||
let vNode = queryFixture('<input id="target" type="text" role="textbox"/>'); | ||
const vNode = queryFixture( | ||
'<input id="target" type="text" role="textbox"/>' | ||
); | ||
assert.isTrue(rule.matches(null, vNode)); | ||
}); | ||
|
||
it('return true for element with valid role', function () { | ||
let vNode = queryFixture('<ol id="target" role="listbox"/>'); | ||
const vNode = queryFixture('<ol id="target" role="listbox"/>'); | ||
assert.isTrue(rule.matches(null, vNode)); | ||
}); | ||
}); |
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
Oops, something went wrong.