4 <script src=
"../resources/js-test.js"></script>
7 <div id=
"checkbox1" role=
"checkbox" aria-checked=
"true">
8 <span aria-hidden=
"true">On
</span>
9 <span aria-hidden=
"true" style=
"visibility: hidden;">Off
</span>
12 <div id=
"checkbox2" role=
"checkbox" aria-checked=
"true">
13 <span>Non-hidden descendant content
</span>
14 <span aria-hidden=
"true">On
</span>
15 <span aria-hidden=
"true" style=
"visibility: hidden;">Off
</span>
24 description('This tests that aria-hidden elements within an element are ' +
25 'not included in accessible name from content');
27 if (window
.testRunner
&& window
.accessibilityController
) {
28 var checkbox1
= accessibilityController
.accessibleElementById('checkbox1');
29 shouldBe('checkbox1.deprecatedTitle.trim()', "'AXTitle:'");
31 var checkbox2
= accessibilityController
.accessibleElementById('checkbox2');
32 shouldBe('checkbox2.deprecatedTitle.trim()',
33 "'AXTitle: Non-hidden descendant content'");
35 document
.getElementById('content').style
.visibility
= 'hidden';