AX: when an element uses role="text" but no aria-label, it should default to textUnde...
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / static-text-role-uses-text-under-element.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
5 <script src="../../../fast/js/resources/js-test-pre.js"></script>
6 <script>
7 var successfullyParsed = false;
8 if (window.layoutTestController)
9    layoutTestController.dumpAsText();
10 </script>
11 </head>
12 <body>
13
14 <div role="text" tabindex=0 id='text1'>
15 <a href="#name1" id="name1link">Text 1</a>
16 <a href="#name2" id="name2link">Text 2</a>
17 <span><b><span>Text 3</span></b></span>
18 </div>
19
20
21 <p id="description"></p>
22 <div id="console"></div>
23
24 <script>
25
26     description("This tests that if an element uses the 'text' role but does not use an aria-label, it can retrieve the text inside of it.");
27
28     if (window.accessibilityController) {
29         document.getElementById("text1").focus();
30         var text = accessibilityController.focusedElement;
31         shouldBe("text.stringValue", "'AXValue: Text 1 Text 2 Text 3'");
32     }
33
34     successfullyParsed = true;
35 </script>
36
37 <script src="../../../fast/js/resources/js-test-post.js"></script>
38
39 </body>
40 </html>
41