OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body id="body"> |
| 7 |
| 8 <ul id="tablist_1" role="tablist"> |
| 9 <li id="tab_1" role="tab" aria-controls="panel_1 panel_2"></li> |
| 10 </ul> |
| 11 |
| 12 <div id="panel_1" role="tabpanel">Panel 1</div> |
| 13 <div id="panel_2" role="tabpanel">Panel 2</div> |
| 14 |
| 15 <p id="description"></p> |
| 16 <div id="console"></div> |
| 17 |
| 18 <script> |
| 19 description("This tests that aria-controls identifies the correct element"); |
| 20 |
| 21 if (window.accessibilityController) { |
| 22 var tab_1 = accessibilityController.accessibleElementById("tablist_1").c
hildAtIndex(0); |
| 23 var panel_1 = accessibilityController.accessibleElementById("panel_1"); |
| 24 var panel_2 = accessibilityController.accessibleElementById("panel_2"); |
| 25 |
| 26 shouldBeTrue("tab_1.ariaControlsElementAtIndex(0).isEqual(panel_1)"); |
| 27 shouldBeTrue("tab_1.ariaControlsElementAtIndex(1).isEqual(panel_2)"); |
| 28 |
| 29 } |
| 30 |
| 31 </script> |
| 32 |
| 33 </body> |
| 34 </html> |
OLD | NEW |