| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="../resources/run-after-layout-and-paint.js"></script> |
| </head> |
| <body id="body"> |
| |
| <div id="textrole" tabindex=0 role="text" aria-label="all at once"> |
| <b>hello world</b> |
| <i>this is a test</i> |
| <a href="#">more test</a> |
| </div> |
| |
| <script> |
| |
| test_after_layout_and_paint((t) => { |
| document.getElementById("textrole").focus(); |
| var textrole = accessibilityController.focusedElement; |
| assert_equals(textrole.role, 'AXRole: AXStaticText'); |
| assert_equals(textrole.name, 'all at once'); |
| |
| // now check the hit-testing |
| var x = textrole.clickPointX; |
| var y = textrole.clickPointY; |
| assert_equals(textrole.elementAtPoint(x, y).isEqual(textrole), true); |
| }, "This tests that you can set an ARIA text role and that it will not have children through hit testing"); |
| |
| |
| </script> |
| |
| </body> |
| </html> |