AX: AXARIACurrent exposed but not displayed in Accessibility Inspector
[WebKit-https.git] / LayoutTests / accessibility / mac / aria-current-attribute-exposed.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7
8 <div id="container">
9 <a id="link1" href="/">Link</a>
10 <a id="link2" aria-current="true" href="/">Current Link</a>
11 </div>
12
13 <p id="description"></p>
14 <div id="console"></div>
15
16 <script>
17     description("This tests that aria-current attribute is correctly exposed.");
18     
19     if (window.accessibilityController) {
20         var link1 = accessibilityController.accessibleElementById("link1");
21         var link2 = accessibilityController.accessibleElementById("link2");
22         
23         // Attributes of link1 shouldn't contain AXARIACurrent
24         shouldBeFalse("link1.allAttributes().includes('AXARIACurrent: true')");
25         // Attributes of link2 should contain AXARIACurrent
26         shouldBeTrue("link2.allAttributes().includes('AXARIACurrent: true')");
27     }
28 </script>
29
30 <script src="../../resources/js-test-post.js"></script>
31 </body>
32 </html>