AX: [ATK] Explicitly-set aria-sort value of "none" should be exposed as an object...
[WebKit-https.git] / LayoutTests / accessibility / gtk / aria-sort-values.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7   <div id="content">
8     <div role="grid">
9       <div role="row">
10         <div role="columnheader" id="test1">content</div>
11         <div role="columnheader" id="test2" aria-sort="ascending">content</div>
12         <div role="columnheader" id="test3" aria-sort="descending">content</div>
13         <div role="columnheader" id="test4" aria-sort="other">content</div>
14         <div role="columnheader" id="test5" aria-sort="none">content</div>
15         <div role="columnheader" id="test6" aria-sort="foo">content</div>
16         <div role="columnheader" id="test7" aria-sort="">content</div>
17         <div role="gridcell" id="test8" aria-sort="other">content</div>
18       </div>
19     </div>
20   </div>
21 <p id="description"></p>
22 <div id="console"></div>
23 <script>
24     function sortAttribute(axElement) {
25         var allAttributes = axElement.allAttributes();
26         var index = allAttributes.search("sort:");
27         if (index == -1)
28             return "(sort attribute not exposed)";
29         string = allAttributes.substring(index);
30         return string.substring(0, string.search(","));
31     }
32
33     description("This verifies that explicitly-set values of aria-sort are exposed.");
34     if (window.accessibilityController) {
35         for (var i = 1; i <= 8; i++) {
36             var axElement = accessibilityController.accessibleElementById("test" + i);
37             debug("test" + i + " " + axElement.role + " " + sortAttribute(axElement));
38         }
39
40         document.getElementById("content").style.visibility = "hidden";
41     }
42 </script>
43 <script src="../../resources/js-test-post.js"></script>
44 </body>
45 </html>
46