OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <style> |
| 6 .hideAllContainers .container { |
| 7 display: none; |
| 8 } |
| 9 </style> |
| 10 |
| 11 <div id="link1" class="container" tabIndex=0 role="link"> |
| 12 <p>1</p> |
| 13 <table> |
| 14 <tr><td>2</td></tr> |
| 15 <tr><td style="visibility: hidden">3</td></tr> |
| 16 <tr><td style="display:none">4</td></tr> |
| 17 <tr style="visibility: hidden"><td>5</td></tr> |
| 18 <tr style="display: none"><td>6</td></tr> |
| 19 </table> |
| 20 <p>7</p> |
| 21 </div> |
| 22 |
| 23 <script> |
| 24 test(function(t) { |
| 25 var axLink1 = accessibilityController.accessibleElementById("link1"); |
| 26 assert_equals(axLink1.name, "1 2 7"); |
| 27 }, "Visibility: 'hidden' and display: 'none' inside ARIA link"); |
| 28 </script> |
| 29 |
| 30 <div class="container"> |
| 31 <input id="input2" aria-labelledby="label2"> |
| 32 |
| 33 <div id="label2"> |
| 34 <p>1</p> |
| 35 <table> |
| 36 <tr><td>2</td></tr> |
| 37 <tr><td style="visibility: hidden">3</td></tr> |
| 38 <tr><td style="display:none">4</td></tr> |
| 39 <tr style="visibility: hidden"><td>5</td></tr> |
| 40 <tr style="display: none"><td>6</td></tr> |
| 41 </table> |
| 42 <p>7</p> |
| 43 </div> |
| 44 </div> |
| 45 |
| 46 <script> |
| 47 test(function(t) { |
| 48 var axInput2 = accessibilityController.accessibleElementById("input2"); |
| 49 assert_equals(axInput2.name, "1 2 7"); |
| 50 }, "Visibility: 'hidden' and display: 'none' inside aria-labelledby label subtre
e"); |
| 51 </script> |
| 52 |
| 53 <div class="container"> |
| 54 <input id="input3" aria-labelledby="3a 3b 3c 3d 3e 3f 3g"> |
| 55 |
| 56 <p id="3a">1</p> |
| 57 <table> |
| 58 <tr><td id="3b">2</td></tr> |
| 59 <tr><td id="3c" style="visibility: hidden">3</td></tr> |
| 60 <tr><td id="3d" style="display:none">4</td></tr> |
| 61 <tr id="3e" style="visibility: hidden"><td>5</td></tr> |
| 62 <tr id="3f" style="display: none"><td>6</td></tr> |
| 63 </table> |
| 64 <p id="3g">7</p> |
| 65 </div> |
| 66 |
| 67 <script> |
| 68 test(function(t) { |
| 69 var axInput3 = accessibilityController.accessibleElementById("input3"); |
| 70 assert_equals(axInput3.name, "1 2 3 4 6 7"); |
| 71 }, "Visibility: 'hidden' and display: 'none' referenced directly by aria-labelle
dby"); |
| 72 </script> |
| 73 |
| 74 <div class="container"> |
| 75 <input id="input4" aria-labelledby="label4"> |
| 76 |
| 77 <div style="display: none"> |
| 78 <div id="label4"> |
| 79 <p>1</p> |
| 80 <table> |
| 81 <tr><td>2</td></tr> |
| 82 <tr><td style="visibility: hidden">3</td></tr> |
| 83 <tr><td style="display:none">4</td></tr> |
| 84 <tr style="visibility: hidden"><td>5</td></tr> |
| 85 <tr style="display: none"><td>6</td></tr> |
| 86 </table> |
| 87 <p>7</p> |
| 88 </div> |
| 89 </div> |
| 90 </div> |
| 91 |
| 92 <script> |
| 93 test(function(t) { |
| 94 var axInput4 = accessibilityController.accessibleElementById("input4"); |
| 95 assert_equals(axInput4.name, " 1 2 7 "); |
| 96 }, "Visibility: 'hidden' and display: 'none' inside aria-labelledby label subtre
e, where entire label subtree is display: 'none'"); |
| 97 </script> |
| 98 |
| 99 <script> |
| 100 if (window.testRunner) |
| 101 document.body.className = "hideAllContainers"; |
| 102 </script> |
OLD | NEW |