1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../fast/js/resources/js-test-pre.js"></script>
9 <h1 id="heading">Steps</h1>
11 <main id="main" tabindex=0>
13 <div tabindex="-1" class="step-one" aria-hidden="true"><span>Step 1: Do something</span></div>
14 <div tabindex="-1" class="step-two" aria-hidden="true"><span>Step 2: Do another thing</span></div>
15 <div tabindex="-1" class="step-three" aria-hidden="true"><span>Step 3: Do one last thing</span></div>
21 <p id="description"></p>
22 <div id="console"></div>
26 description("This tests that if aria-hidden changes on an element, all it's existing children will update their children caches");
28 if (window.accessibilityController) {
29 document.getElementById("main").focus();
31 var main = accessibilityController.focusedElement;
32 // Access the element so the children cache is generated.
35 shouldBe("main.childrenCount", "1");
37 var group = document.getElementsByTagName('main')[0];
38 var items = group.getElementsByTagName('div');
39 items[0].removeAttribute('aria-hidden');
41 // After removing aria-hidden, the new count should be 2.
42 shouldBe("main.childrenCount", "2");
44 // And most importantly, the DIV that was made non-hidden should have one child now.
45 shouldBe("main.childAtIndex(1).childrenCount", "1");
50 <script src="../fast/js/resources/js-test-post.js"></script>