| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <style> |
| div[role=grid] { |
| display: table; |
| } |
| div[role=row] { |
| display: table-row; |
| } |
| div[role=gridcell], div[role=rowheader] { |
| padding: 1em; |
| display:table-cell; |
| } |
| </style> |
| <body id="body"> |
| |
| <div role="grid"> |
| <div role="row"> |
| <div role="rowheader">Month</div> |
| <div role="gridcell" id="cell1" aria-colspan="2">Jan</div> |
| <div role="gridcell" id="cell2">Mar</div> |
| </div> |
| <div role="row"> |
| <div role="rowheader">Expenses</div> |
| <div role="gridcell">100</div> |
| <div role="gridcell" id="cell3">130</div> |
| <div role="gridcell">90</div> |
| </div> |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that cells that span multiple columns within an ARIA grid have correct column index range"); |
| |
| if (window.accessibilityController) { |
| |
| var cell1 = accessibilityController.accessibleElementById("cell1"); |
| shouldBe("cell1.role", "'AXRole: AXCell'"); |
| shouldBe("cell1.columnIndexRange()", "'{1, 2}'"); |
| |
| var cell2 = accessibilityController.accessibleElementById("cell2"); |
| shouldBe("cell2.role", "'AXRole: AXCell'"); |
| shouldBe("cell2.columnIndexRange()", "'{3, 1}'"); |
| |
| // also test cell index without column span |
| var cell3 = accessibilityController.accessibleElementById("cell3"); |
| shouldBe("cell3.role", "'AXRole: AXCell'"); |
| shouldBe("cell3.columnIndexRange()", "'{2, 1}'"); |
| } |
| </script> |
| |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |