3 if (window
.layoutTestController
)
4 layoutTestController
.dumpAsText();
8 <!-- This test makes sure that a img acting as an aria button still returns its alt tag as the description -->
10 <img id='image'
src=
"resources/cake.png" role=
"button" alt=
"alternate" title=
"title">
12 <div id=
"result"></div>
16 if (window
.accessibilityController
) {
17 var result
= document
.getElementById("result");
19 var body
= document
.getElementById("body");
21 var imgUIElement
= accessibilityController
.focusedElement
.childAtIndex(0).childAtIndex(0);
22 var pattern
= "AXDescription: alternate";
23 if (imgUIElement
.allAttributes().indexOf(pattern
) != -1) {
24 result
.innerText
+= "Test passed\n";
27 result
.innerText
+= "Test failed\n";