-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update testdriver to support computedrole/computedlabel (#38758)
Closes web-platform-tests/interop-accessibility#5 Includes basic explicit and implcit role/label tests each for accname (in /accname) and aria role computation (in /aria/role)
- Loading branch information
1 parent
031a7db
commit 790bb1a
Showing
9 changed files
with
170 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
|
||
<div id='d' style='height: 100px; width: 100px' role="group" aria-label="test label"></div> | ||
<h1 id="h">test heading</h1> | ||
<script> | ||
|
||
promise_test(async t => { | ||
const label = await test_driver.get_computed_label(document.getElementById('d')); | ||
assert_true(label == "test label"); | ||
}, "tests labelFrom: author"); | ||
|
||
promise_test(async t => { | ||
const label = await test_driver.get_computed_label(document.getElementById('h')); | ||
assert_true(label == "test heading"); | ||
}, "tests labelFrom: contents"); | ||
|
||
</script> |
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,23 @@ | ||
<!doctype html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
|
||
<div id='d' style='height: 100px; width: 100px' role="group" aria-label="test label"></div> | ||
<h1 id="h">test heading</h1> | ||
<script> | ||
|
||
promise_test(async t => { | ||
const role = await test_driver.get_computed_role(document.getElementById('d')); | ||
assert_true(role == "group"); | ||
}, "tests explicit role"); | ||
|
||
|
||
promise_test(async t => { | ||
const role = await test_driver.get_computed_role(document.getElementById('h')); | ||
assert_true(role == "heading"); | ||
}, "tests implicit role"); | ||
|
||
</script> |