| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| <script> |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| </script> |
| </head> |
| <body> |
| |
| <div id="parent" tabindex=0 role="group"> |
| <span tabindex=0 role="button" id="button1">button 1</span> |
| <span tabindex=0 id="button2" aria-label="button 2"></span> |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that when an ARIA role changes, the AX hierarchy is updated accordingly."); |
| |
| if (window.accessibilityController) { |
| document.getElementById("parent").focus(); |
| var parent = accessibilityController.focusedElement; |
| shouldBe("parent.childAtIndex(0).role", "'AXRole: AXButton'"); |
| shouldBe("parent.childAtIndex(1).role", "'AXRole: '"); |
| |
| document.getElementById("button1").removeAttribute("role"); |
| document.getElementById("button2").setAttribute("role", "button"); |
| |
| shouldBe("parent.childAtIndex(0).role", "'AXRole: AXStaticText'"); |
| shouldBe("parent.childAtIndex(1).role", "'AXRole: AXButton'"); |
| } |
| |
| </script> |
| |
| <script src="../../../fast/js/resources/js-test-post.js"></script> |
| |
| </body> |
| </html> |
| |