| <!DOCTYPE HTML> |
| <script src="../resources/gc.js"></script> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| |
| <!-- |
| |
| Accessibility Object Model |
| Explainer: https://github.com/WICG/aom/blob/gh-pages/explainer.md |
| Spec: https://wicg.github.io/aom/spec/ |
| |
| --> |
| |
| <script> |
| if (window.internals) |
| internals.runtimeFlags.accessibilityObjectModelEnabled = true; |
| </script> |
| |
| <div role=heading id=heading> |
| |
| <script> |
| test(function(t) { |
| var node = document.getElementById("heading"); |
| var axNode = accessibilityController.accessibleElementById("heading"); |
| node.accessibleNode.level = 3; |
| |
| // For historical reasons intValue returns the heading level. |
| // Default heading level for role=heading is 2, AccessibleNode should |
| // not override this value. |
| assert_equals(axNode.intValue, 2); |
| }, "AOM level property"); |
| </script> |
| |
| <div role=list> |
| <div role=listitem id="listitem"></div> |
| </div> |
| |
| <script> |
| test(function(t) { |
| var node = document.getElementById("listitem"); |
| var axNode = accessibilityController.accessibleElementById("listitem"); |
| node.accessibleNode.posInSet = 9; |
| node.accessibleNode.setSize = 10; |
| assert_equals(axNode.posInSet, 0); |
| assert_equals(axNode.setSize, 0); |
| }, "AOM posInSet and setSize"); |
| </script> |