Chromium Code Reviews| 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 </body> | |
| 18 | |
| 19 <script> | |
| 20 function axElementById(id) { | |
| 21 return accessibilityController.accessibleElementById(id); | |
| 22 } | |
| 23 | |
| 24 test(function(t) { | |
| 25 var axRow = axElementById("treegrid1-row1"); | |
| 26 assert_equals(axRow.name, 'row head data'); | |
| 27 }, "The row's name must concatenate the children if the row is focusable"); | |
| 28 | |
| 29 test(function(t) { | |
|
dmazzoni
2017/04/10 16:32:12
It's probably good to have a negative test, too -
aleventhal
2017/04/10 17:19:00
Done.
| |
| 30 var axRow = axElementById("treegrid2-row1"); | |
| 31 assert_equals(axRow.name, 'row head data'); | |
| 32 }, "The row's name must concatenate the children if the parent has aria-activede scendant"); | |
| 33 | |
| 34 </script> | |
| OLD | NEW |