1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
8 <input type=
"checkbox" id=
"check1" />
9 <input type=
"checkbox" id=
"check2" checked
/>
11 <div tabindex=
"0" role=
"checkbox" id=
"check3">X
</div>
12 <div tabindex=
"0" role=
"checkbox" id=
"check4" aria-checked=
"true">X
</div>
14 <input type=
"checkbox" id=
"check5" aria-checked=
"false" />
15 <input type=
"checkbox" id=
"check6" aria-checked=
"false" checked
/>
16 <input type=
"checkbox" id=
"check7" aria-checked=
"true" />
17 <input type=
"checkbox" id=
"check8" aria-checked=
"true" checked
/>
19 <p id=
"description"></p>
20 <div id=
"console"></div>
24 description("This tests that ARIA checkboxes correctly handle the aria-checked attribute.");
26 if (window
.accessibilityController
) {
28 var answers
= [[ "check1", "false" ],
30 [ "check3", "false" ],
32 [ "check5", "false" ],
34 [ "check7", "false" ],
35 [ "check8", "true" ]];
37 for (var i
= 0; i
< answers
.length
; i
++) {
38 var checkbox
= document
.getElementById(answers
[i
][0]);
40 checkbox
= accessibilityController
.focusedElement
;
41 shouldBe("checkbox.isChecked", answers
[i
][1]);