| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test.js"></script> |
| </head> |
| <body> |
| |
| <ul id="tablist_1" role="tablist"> |
| <li id="tab_1" role="tab" tabindex="0" class="">Crust</li> |
| <li id="tab_2" role="tab" tabindex="0" class="">Veges</li> |
| </ul> |
| |
| <div id="panel_1" role="tabpanel" aria-labelledby="tab_1"> |
| <h3>Select Crust</h3> |
| </div> |
| |
| <script> |
| description("This tests that the aria roles for tab, tabpanel and tablist work as expected correctly."); |
| |
| if (window.accessibilityController) { |
| let output = ""; |
| |
| let tabList = accessibilityController.accessibleElementById("tablist_1"); |
| let tab1 = tabList.childAtIndex(0); |
| let tab2 = tabList.childAtIndex(1); |
| let tabPanel = accessibilityController.accessibleElementById("panel_1"); |
| |
| output += `tabList.role = ${tabList.role}\n`; |
| output += `tab1.role = ${tab1.role}\n`; |
| output += `tab1.title = ${tab1.title}\n`; |
| output += `tab1.childrenCount = ${tab1.childrenCount}\n`; |
| output += `tab2.role = ${tab2.role}\n`; |
| output += `tab2.title = ${tab2.title}\n`; |
| output += `tabPanel.role = ${tabPanel.role}\n`; |
| output += `tabPanel.subrole = ${tabPanel.subrole}\n`; |
| |
| debug(output); |
| } |
| </script> |
| </body> |
| </html> |