1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../resources/js-test-pre.js"></script>
9 <input id="number" type="number"><br>
12 <p id="description"></p>
13 <div id="console"></div>
17 description("This tests that input type='number' exposes the accessibility of it's stepper correctly");
19 if (window.accessibilityController) {
21 document.getElementById("number").focus();
22 var textfield = accessibilityController.focusedElement;
24 // Verify that the click point is the same as the child.
25 shouldBe("textfield.childrenCount", "1");
27 var incrementor = textfield.childAtIndex(0);
29 shouldBe("incrementor.role", "'AXRole: AXIncrementor'");
30 shouldBeTrue("incrementor.width > 0");
31 shouldBeTrue("incrementor.height > 0");
32 shouldBe("incrementor.childrenCount", "2");
34 shouldBe("incrementor.childAtIndex(0).role", "'AXRole: AXButton'");
35 shouldBe("incrementor.childAtIndex(0).subrole", "'AXSubrole: AXIncrementArrow'");
36 shouldBeTrue("incrementor.childAtIndex(0).width > 0");
37 shouldBeTrue("incrementor.childAtIndex(0).height > 0");
38 shouldBeTrue("incrementor.childAtIndex(0).isEnabled");
41 incrementor.childAtIndex(0).press();
42 shouldBe("textfield.stringValue", "'AXValue: 1'");
44 shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
45 shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
46 shouldBeTrue("incrementor.childAtIndex(1).width > 0");
47 shouldBeTrue("incrementor.childAtIndex(1).height > 0");
48 shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
51 incrementor.childAtIndex(1).press();
52 shouldBe("textfield.stringValue", "'AXValue: 0'");
57 <script src="../../resources/js-test-post.js"></script>