1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
8 <div tabindex=0 id="box1" role="checkbox" aria-checked="false">checkbox1</div><BR>
9 <div tabindex=0 id="box2" role="checkbox" aria-checked="true">checkbox2</div><BR>
10 <div tabindex=0 id="box3" role="checkbox" aria-checked="mixed">checkbox3</div><BR>
11 <div tabindex=0 id="box4" role="checkbox">checkbox4</div><BR>
12 <input tabindex=0 id="box5" type="checkbox" role="checkbox" aria-checked="true"><br>
14 <p id="description"></p>
15 <div id="console"></div>
19 description("This tests that checkboxes will return the right AXValue for false/true/mixed.");
21 if (window.accessibilityController) {
24 document.getElementById("box1").focus();
25 shouldBe("accessibilityController.focusedElement.intValue", "0");
28 document.getElementById("box2").focus();
29 shouldBe("accessibilityController.focusedElement.intValue", "1");
32 document.getElementById("box3").focus();
33 shouldBe("accessibilityController.focusedElement.intValue", "2");
35 // no aria state, default to off
36 document.getElementById("box4").focus();
37 shouldBe("accessibilityController.focusedElement.intValue", "0");
39 // native checkbox is also aria checkbox, default to native semantics
40 document.getElementById("box5").focus();
41 shouldBe("accessibilityController.focusedElement.intValue", "0");
47 <script src="../../../fast/js/resources/js-test-post.js"></script>