Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / accessibility / title-tag-on-unimportant-elements-is-help-text.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <script src="../resources/accessibility-helper.js"></script>
6 </head>
7 <body id="body">
8
9 <div id="div1" title="test1">a</div>
10 <div id="div2" role="group" title="test2">a</div>
11
12 <button id="button1" title="test5"></button>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that if a semantically unimportant element has title text, that text is exposed as help text rather than descriptive text.");
20
21     if (window.accessibilityController) {
22
23           // div1 is unimportant, so description should be blank.
24           shouldBe("platformValueForW3CDescription(accessibilityController.accessibleElementById('div1'))", "'test1'");
25           shouldBe("platformValueForW3CName(accessibilityController.accessibleElementById('div1'))", "''");
26
27           // div2 has an author applied role, so title tag should be used for description.
28           shouldBe("platformValueForW3CDescription(accessibilityController.accessibleElementById('div2'))", "''");
29           shouldBe("platformValueForW3CName(accessibilityController.accessibleElementById('div2'))", "'test2'");
30
31           // button is a meaningful element, so it should have a description.
32           shouldBe("platformValueForW3CDescription(accessibilityController.accessibleElementById('button1'))", "''");
33           shouldBe("platformValueForW3CName(accessibilityController.accessibleElementById('button1'))", "'test5'");
34     }
35
36 </script>
37
38 <script src="../resources/js-test-post.js"></script>
39 </body>
40 </html>