Fix keypad issue when ime context transit to another context
[framework/web/webkit-efl.git] / LayoutTests / accessibility / aria-labelledby-overrides-label.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <span id="labelShutdown"><label for="shutdownTime">Shut down computer after</label></span>
9 <input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" />
10 <span id="shutdownUnit">minutes</span>
11
12 <p id="description"></p>
13 <div id="console"></div>
14
15 <script>
16
17     description("This tests that if aria-labelledby is used, then label elements are not used");
18
19     if (window.accessibilityController) {
20
21           var text = document.getElementById("shutdownTime");
22           text.focus();
23           text = accessibilityController.focusedElement;
24
25           shouldBe("text.description", "'AXDescription: Shut down computer after 10 minutes'");
26
27           // There should be no title UI element.
28           shouldBe("text.titleUIElement() != null && text.titleUIElement().isValid", "false");
29           
30           // The label element is in a group, in a group, in the web area.
31           var labelElement = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0).childAtIndex(0).childAtIndex(0);
32
33           // This just makes sure that the label element is still visible in the AX hierarchy, even though
34           // it's a label element (sometimes they are ignored).
35           shouldBe("labelElement.role", "'AXRole: AXStaticText'");
36     }
37
38 </script>
39
40 <script src="../fast/js/resources/js-test-post.js"></script>
41 </body>
42 </html>