1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
6 var successfullyParsed = false;
8 <script src="../../../fast/js/resources/js-test-pre.js"></script>
12 <p>Simple paragraph</p>
13 <p role="grid">A paragraph pretending to be a table</p>
15 <label>A label</label>
16 <label role="heading">Who said label? It's a heading!</label>
18 <form>A form with a button <button name="button" value="Button">Click me!</button></form>
19 <form role="button">Just a button <button name="button" value="Button">Click me!</button></form>
21 <div>Just some text inside a div</form>
22 <div role="textbox">This div is contains a textbox (an entry)</div>
24 <p id="description"></p>
25 <div id="console"></div>
27 description("This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements");
29 if (window.layoutController) {
30 layoutTestController.dumpAsText();
33 if (window.accessibilityController) {
34 document.getElementById("body").focus();
35 var webArea = accessibilityController.focusedElement;
38 var element = webArea.childAtIndex(0);
39 shouldBe("element.role", "'AXRole: paragraph'");
40 element = webArea.childAtIndex(1);
41 shouldBe("element.role", "'AXRole: table'");
43 // Labels are exposed as inside a panel
44 var labelsPanel = webArea.childAtIndex(2);
45 element = labelsPanel.childAtIndex(0);
46 shouldBe("element.role", "'AXRole: label'");
47 element = labelsPanel.childAtIndex(1);
48 shouldBe("element.role", "'AXRole: heading'");
51 element = webArea.childAtIndex(3);
52 shouldBe("element.role", "'AXRole: form'");
53 element = webArea.childAtIndex(4);
54 shouldBe("element.role", "'AXRole: push button'");
57 element = webArea.childAtIndex(5);
58 shouldBe("element.role", "'AXRole: panel'");
59 element = webArea.childAtIndex(6);
60 shouldBe("element.role", "'AXRole: entry'");
63 successfullyParsed = true;
65 <script src="../../../fast/js/resources/js-test-post.js"></script>