OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <body id="body"> |
| 5 <div role="treegrid"> |
| 6 <div role="row" id="treegrid1-row1" tabindex="-1"> |
| 7 <div role="rowheader">row head</div> |
| 8 <div role="gridcell">data</div> |
| 9 </div> |
| 10 </div> |
| 11 <div role="treegrid" aria-activedescendant="treegrid2-row1"> |
| 12 <div role="row" id="treegrid2-row1"> |
| 13 <div role="rowheader">row head</div> |
| 14 <div role="gridcell">data</div> |
| 15 </div> |
| 16 </div> |
| 17 <div role="grid"> |
| 18 <div role="row" id="treegrid3-row1"> |
| 19 <div role="rowheader">row head</div> |
| 20 <div role="gridcell">data</div> |
| 21 </div> |
| 22 </div> |
| 23 </body> |
| 24 |
| 25 <script> |
| 26 function axElementById(id) { |
| 27 return accessibilityController.accessibleElementById(id); |
| 28 } |
| 29 |
| 30 test(function(t) { |
| 31 var axRow = axElementById("treegrid1-row1"); |
| 32 assert_equals(axRow.name, 'row head data'); |
| 33 }, "The row's name must concatenate the children if the row is focusable"); |
| 34 |
| 35 test(function(t) { |
| 36 var axRow = axElementById("treegrid2-row1"); |
| 37 assert_equals(axRow.name, 'row head data'); |
| 38 }, "The row's name must concatenate the children if the parent has aria-activede
scendant"); |
| 39 |
| 40 test(function(t) { |
| 41 var axRow = axElementById("treegrid3-row1"); |
| 42 assert_equals(axRow.name, ''); |
| 43 }, "The row's name must empty when the parent is not focusable and there is no o
ther labelling markup (for performance reasons)"); |
| 44 |
| 45 </script> |
OLD | NEW |