3 <title>Image link in the presence of inline continuations
</title>
6 testRunner
.dumpAsText();
11 <h2>Image link in the presence of inline continuations
</h2>
13 <p>This test checks that a block inside a link does not unduly disturb
14 the render tree via inline continuations. In particular, it checks
15 that adding
<div role=presentation
> between a link and its
16 contained image does not alter the accessibility tree at all, other
17 than with respect to size.
</p>
20 <a href=
"http://www.wowhead.com/?item=33924"><img alt=
"Delicious cake" src=
"resources/cake.png"></a>
24 <a href=
"http://www.wowhead.com/?item=33924"><div role=
"presentation"><img alt=
"Delicious cake" src=
"resources/cake.png"></div></a>
27 <pre id=
"result"></div>
32 var result
= elt
.allAttributes() + "\n\n";
33 var count
= elt
.childrenCount
;
34 for (var i
= 0; i
< count
; ++i
) {
35 result
+= "Child " + i
+ ":\n" + axTree(elt
.childAtIndex(i
));
40 if (window
.accessibilityController
) {
41 var result
= document
.getElementById("result");
42 document
.getElementById("plain").focus();
43 var plainResult
= axTree(accessibilityController
.focusedElement
);
44 plainResult
.replace(/AXSize.*\n/g, "");
46 document
.getElementById("with-div").focus();
47 var withDivResult
= axTree(accessibilityController
.focusedElement
);
48 withDivResult
.replace(/AXSize.*\n/g, "");
50 if (plainResult
== withDivResult
) {
51 result
.innerHTML
= "PASS: accessibility trees were identical other than size."
53 result
.innerHTML
= "FAIL: accessibility trees differ.\nPlain image link: \n" + plainResult
+ "\nWith presentation div:\n" + withDivResult
;