| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| <title>aria-sort</title> |
| </head> |
| <body> |
| |
| <div role="grid"> |
| <div role="row"> |
| <span role="gridcell"></span> |
| <!-- Ascending aria-sort direction. --> |
| <span aria-sort="ascending" id="col1" role="columnheader">column</span> |
| <!-- Descending aria-sort direction. --> |
| <span aria-sort="descending" id="col2" role="columnheader">column</span> |
| <!-- Other aria-sort direction. --> |
| <span aria-sort="other" id="col3" role="columnheader">column</span> |
| </div> |
| <div role="row"> |
| <!-- No aria-sort direction. --> |
| <span id="row1" role="rowheader">row</span> |
| <span role="gridcell"></span> |
| <span role="gridcell"></span> |
| <span role="gridcell"></span> |
| </div> |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| description("This tests that aria-sort is exposed correctly to the Mac accessibility API."); |
| |
| if (window.accessibilityController) { |
| var col1 = accessibilityController.accessibleElementById("col1"); |
| shouldBe("col1.isAttributeSupported('AXSortDirection')", "true"); |
| shouldBe("col1.stringAttributeValue('AXSortDirection')", "'AXAscendingSortDirection'"); |
| |
| var col2 = accessibilityController.accessibleElementById("col2"); |
| shouldBe("col2.isAttributeSupported('AXSortDirection')", "true"); |
| shouldBe("col2.stringAttributeValue('AXSortDirection')", "'AXDescendingSortDirection'"); |
| |
| var col3 = accessibilityController.accessibleElementById("col3"); |
| shouldBe("col3.isAttributeSupported('AXSortDirection')", "true"); |
| shouldBe("col3.stringAttributeValue('AXSortDirection')", "'AXUnknownSortDirection'"); |
| |
| var row1 = accessibilityController.accessibleElementById("row1"); |
| shouldBe("row1.isAttributeSupported('AXSortDirection')", "false"); |
| } |
| </script> |
| |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |