4 <script src=
"../resources/js-test.js"></script>
6 <style>canvas { display: inline; border:
1px solid #
000; }
</style>
7 <!-- No whitespace between canvases on purpose, so there's the same
8 number of children of the container element on all platforms. -->
9 <div id=
"container" tabIndex=
0 aria-label=
"Container"><canvas id=
"canvas1" width=
"100" height=
"100" aria-label=
"Canvas label">Fallback text
</canvas><canvas id=
"canvas2" width=
"100" height=
"100"><button>Inner button
</button></canvas><canvas id=
"canvas3-skipped" width=
"100" height=
"100"></canvas></div>
11 <div id=
"console"></div>
13 description("This test makes sure that a canvas with and without fallback content each has the right role and description.")
15 if (window
.testRunner
&& window
.accessibilityController
) {
16 window
.testRunner
.dumpAsText();
18 document
.getElementById('container').focus();
19 var axContainer
= accessibilityController
.focusedElement
;
21 shouldBe("axContainer.childrenCount", "2");
23 var axCanvas1
= axContainer
.childAtIndex(0);
24 debug('Canvas 1 description: ' + axCanvas1
.deprecatedDescription
);
25 debug('Canvas 1 role: ' + axCanvas1
.role
);
27 var axCanvas2
= axContainer
.childAtIndex(1);
28 debug('Canvas 2 description: ' + axCanvas2
.deprecatedDescription
);
29 debug('Canvas 2 role: ' + axCanvas2
.role
);