OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 | 5 |
6 <div id="content"> | 6 <div id="content"> |
7 <div id="checkbox1" role="checkbox" aria-checked="true"> | 7 <div id="checkbox1" role="checkbox" aria-checked="true"> |
8 <span aria-hidden="true">On</span> | 8 <span aria-hidden="true">On</span> |
9 <span aria-hidden="true" style="visibility: hidden;">Off</span> | 9 <span aria-hidden="true" style="visibility: hidden;">Off</span> |
10 </div> | 10 </div> |
11 | 11 |
12 <div id="checkbox2" role="checkbox" aria-checked="true"> | 12 <div id="checkbox2" role="checkbox" aria-checked="true"> |
13 <span>Non-hidden descendant content</span> | 13 <span>Non-hidden descendant content</span> |
14 <span aria-hidden="true">On</span> | 14 <span aria-hidden="true">On</span> |
15 <span aria-hidden="true" style="visibility: hidden;">Off</span> | 15 <span aria-hidden="true" style="visibility: hidden;">Off</span> |
16 </div> | 16 </div> |
17 </div> | 17 </div> |
18 | 18 |
19 | 19 |
20 <div id="console"> | 20 <div id="console"> |
21 </div> | 21 </div> |
22 | 22 |
23 <script> | 23 <script> |
24 description('This tests that aria-hidden elements within an element are ' + | 24 description('This tests that aria-hidden elements within an element are ' + |
25 'not included in accessible name from content'); | 25 'not included in accessible name from content'); |
26 | 26 |
27 if (window.testRunner && window.accessibilityController) { | 27 if (window.testRunner && window.accessibilityController) { |
28 var checkbox1 = accessibilityController.accessibleElementById('checkbox1'); | 28 var checkbox1 = accessibilityController.accessibleElementById('checkbox1'); |
29 shouldBe('checkbox1.deprecatedTitle.trim()', "'AXTitle:'"); | 29 shouldBe('checkbox1.name.trim()', "''"); |
30 | 30 |
31 var checkbox2 = accessibilityController.accessibleElementById('checkbox2'); | 31 var checkbox2 = accessibilityController.accessibleElementById('checkbox2'); |
32 shouldBe('checkbox2.deprecatedTitle.trim()', | 32 shouldBe('checkbox2.name.trim()', |
33 "'AXTitle: Non-hidden descendant content'"); | 33 "'Non-hidden descendant content'"); |
34 | 34 |
35 document.getElementById('content').style.visibility = 'hidden'; | 35 document.getElementById('content').style.visibility = 'hidden'; |
36 } | 36 } |
37 </script> | 37 </script> |
38 </body> | 38 </body> |
39 </html> | 39 </html> |
OLD | NEW |