Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / roles-exposed.html
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../resources/js-test-pre.js"></script>
5
6 <!-- ==================================================================================================== -->
7 <!-- HTML elements in alphabetical order, excepting the need for nesting (e.g. <li> is with its <ol> and <ul> parents) -->
8 <!-- ==================================================================================================== -->
9 <a data-platform="atk,mac" href="#" data-note="[href]" class="ex">X</a>
10 <a data-platform="atk,mac" data-note=":not([href])" class="ex">X</a>
11 <abbr data-platform="atk,mac" data-note=":not([title])" class="ex">X</abbr>
12 <abbr data-platform="atk,mac" title="Times" data-note="[title]" class="ex">X</abbr>
13 <!-- http://webkit.org/b/83989 --><address data-platform="atk,mac" class="ex">X</address>
14 <!-- skipped <area> -->
15 <article data-platform="atk,mac" class="ex">X</article>
16 <aside data-platform="atk,mac" class="ex">X</aside>
17 <audio data-platform="atk,mac" class="ex">X</audio>
18 <b data-platform="atk,mac" class="ex">X</b>
19 <bdo data-platform="atk,mac" class="ex">X</bdo>
20 <blockquote data-platform="atk,mac" class="ex">X</blockquote>
21 <button data-platform="atk,mac" class="ex">X</button>
22 <canvas data-platform="atk,mac" class="ex">X</canvas>
23 <cite data-platform="atk,mac" class="ex">X</cite>
24 <code data-platform="atk,mac" class="ex">X</code>
25 <!-- skipped <command> -->
26 <!-- skipped <datalist> -->
27 <del data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</del>
28 <del data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</del>
29 <!-- skipped <details/summary> http://webkit.org/b/108979 -->
30 <dfn data-platform="atk,mac" class="ex">X</dfn>
31 <dl data-platform="atk,mac" class="ex">
32     <dt data-platform="atk,mac" class="ex">X</dt>
33     <dd data-platform="atk,mac" class="ex">X</dd>
34 </dl>
35 <div data-platform="atk,mac" class="ex">X</div>
36 <em data-platform="atk,mac" class="ex">X</em>
37 <!-- skipped <embed> -->
38 <fieldset data-platform="atk,mac" class="ex">
39     <legend data-platform="atk,mac" class="ex">X</legend>
40 </fieldset>
41 <!-- skipped figure/figcaption http://webkit.org/b/108996 -->
42 <footer data-platform="atk,mac" class="ex">X</footer>
43 <form data-platform="atk,mac" class="ex">X</form>
44 <!-- skipped <frame> -->
45 <!-- skipped <frameset> -->
46 <!-- skipped <head> -->
47 <!-- http://webkit.org/b/109013 --><header data-platform="atk,mac" class="ex">X</header>
48 <hgroup data-platform="atk,mac" class="ex">X</hgroup>
49 <h1 data-platform="atk,mac" class="ex">X</h1>
50 <h2 data-platform="atk,mac" class="ex">X</h2>
51 <h3 data-platform="atk,mac" class="ex">X</h3>
52 <h4 data-platform="atk,mac" class="ex">X</h4>
53 <h5 data-platform="atk,mac" class="ex">X</h5>
54 <h6 data-platform="atk,mac" class="ex">X</h6>
55 <hr data-platform="atk,mac" class="ex">
56 <!-- skipped <html> -->
57 <i data-platform="atk,mac" class="ex">X</i>
58 <!-- skipped <iframe> -->
59 <img data-platform="atk,mac" class="ex" data-note=":not([src]):not([alt])">
60 <img data-platform="atk,mac" class="ex" alt="" data-note="[alt='']">
61 <img data-platform="atk,mac" class="ex" src="foo.png" data-note="[src]:not([alt])">
62 <img data-platform="atk,mac" class="ex" alt="X" data-note="[alt='X']">
63 <img data-platform="atk,mac" class="ex" alt="X" usemap="imagemap" data-note="[usemap][alt='X']">
64 <img data-platform="atk,mac" class="ex" usemap="imagemap" data-note="[usemap]:not([alt])">
65 <input data-platform="atk,mac" type="button" value="X" class="ex" data-note="[type='button']">
66 <!-- skipped <menu><input type="button"></menu> -->
67 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="color" value="X" class="ex" data-note="[type='color']">
68 <input data-platform="atk,mac" type="checkbox" class="ex" data-note="[type='checkbox']">
69 <!-- skipped <menu><input type="checkbox"></menu> -->
70 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="date" value="X" class="ex" data-note="[type='date']">
71 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="datetime" value="X" class="ex" data-note="[type='datetime']">
72 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="datetime-local" value="X" class="ex" data-note="[type='datetime-local']">
73 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="email" value="X" class="ex" data-note="[type='email']">
74 <input data-platform="atk,mac" type="file" class="ex" data-note="[type='file']">
75 <input data-platform="atk,mac" type="hidden" class="ex" data-note="[type='hidden']">
76 <input data-platform="atk,mac" type="image" class="ex" data-note="[type='image']">
77 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="month" value="X" class="ex" data-note="[type='month']">
78 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="number" value="X" class="ex" data-note="[type='number']">
79 <input data-platform="atk,mac" type="password" value="X" class="ex" data-note="[type='password']">
80 <input data-platform="atk,mac" type="radio" class="ex" data-note="[type='radio']">
81 <!-- skipped <menu><input type="radio"></menu> -->
82 <input data-platform="atk,mac" type="range" class="ex" data-note="[type='range']">
83 <input data-platform="atk,mac" type="reset" class="ex" data-note="[type='reset']">
84 <input data-platform="atk,mac" type="search" value="X" class="ex" data-note="[type='search']">
85 <input data-platform="atk,mac" type="submit" class="ex" data-note="[type='submit']">
86 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="tel" value="X" class="ex" data-note="[type='tel']">
87 <input data-platform="atk,mac" type="text" value="X" class="ex" data-note="[type='text']">
88 <!-- skipped <input type="text"> with suggestions source element: http://www.w3.org/html/wg/drafts/html/master/forms.html#concept-input-list -->
89 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="time" value="X" class="ex" data-note="[type='time']">
90 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="url" value="X" class="ex" data-note="[type='url']">
91 <!-- http://webkit.org/b/109017 --><input data-platform="atk,mac" type="week" value="X" class="ex" data-note="[type='week']">
92 <ins data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</ins>
93 <ins data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</ins>
94 <!-- skipped <link> -->
95 <map data-platform="atk,mac" class="ex" name="imagemap">
96   <area data-platform="atk,mac" class="ex" shape="rect" coords="0,0,10,10" href="#" title="x" />
97 </map>
98 <!-- http://webkit.org/b/109018 --><mark data-platform="atk,mac" class="ex">X</mark>
99 <!-- Some MathML elements do not become hidden by display: none, so hide them after the test via a parent element. http://webkit.org/b/139403 --><div class="ex">
100 <math data-platform="atk,mac" class="ex">X</math>
101 <math><merror data-platform="atk,mac" class="ex">X</merror></math>
102 <math><mfenced data-platform="atk,mac" class="ex"><mi class="ex">X</mi></mfenced></math>
103 <math><mfrac data-platform="atk,mac" class="ex"><mi class="ex">X</mi><mn class="ex">Y</mn></mfrac></math>
104 <math><mi data-platform="atk,mac" class="ex">X</mi></math>
105 <math><mn data-platform="atk,mac" class="ex">X</mn></math>
106 <math><mo data-platform="atk,mac" class="ex">X</mo></math>
107 <math><mroot data-platform="atk,mac" class="ex">X</mroot></math>
108 <math><msqrt data-platform="atk,mac" class="ex">X</msqrt></math>
109 <math><mrow data-platform="atk,mac" class="ex"><mi class="ex">X</mi></mrow></math>
110 <math><ms data-platform="atk,mac" class="ex">X</ms></math>
111 <math>
112   <msub data-platform="atk,mac" class="ex">
113     <mi data-platform="atk,mac" class="ex">X</mi>
114     <mi data-platform="atk,mac" class="ex">X</mi>
115   </msub>
116   <msup data-platform="atk,mac" class="ex">
117     <mi data-platform="atk,mac" class="ex">X</mi>
118     <mi data-platform="atk,mac" class="ex">X</mi>
119   </msup>
120   <msubsup data-platform="atk,mac" class="ex">
121     <mi data-platform="atk,mac" class="ex">X</mi>
122     <mi data-platform="atk,mac" class="ex">X</mi>
123     <mi data-platform="atk,mac" class="ex">x</mi>
124   </msubsup>
125   <mmultiscripts data-platform="atk,mac" class="ex">
126     <mi data-platform="atk,mac" class="ex">X</mi>
127     <mi data-platform="atk,mac" class="ex">X</mi>
128     <mi data-platform="atk,mac" class="ex">x</mi>
129     <mprescripts data-platform="atk,mac" class="ex" />
130     <mi data-platform="atk,mac" class="ex">X</mi>
131     <mi data-platform="atk,mac" class="ex">x</mi>
132   </mmultiscripts>
133 </math>
134 </math>
135 <math><mtext data-platform="atk,mac" class="ex">X</mtext></math>
136 <math>
137   <mtable data-platform="atk,mac" class="ex">
138     <mlabeledtr data-platform="atk,mac" class="ex"><mtd data-platform="atk,mac" class="ex">X</mtd></mlabeledtr>
139     <mtr data-platform="atk,mac" class="ex"><mtd data-platform="atk,mac" class="ex">X</mtd></mtr>
140   </mtable>
141 </math>
142 </div>
143 <!-- skipped <menu> -->
144 <!-- skipped <meta> -->
145 <!-- renable for atk after http://webkit.org/b/163383 fixed --><meter data-platform="mac" class="ex" value="0.75">X</meter>
146 <nav data-platform="atk,mac" class="ex">X</nav>
147 <!-- skipped <noscript> -->
148 <!-- skipped <object> -->
149 <ol data-platform="atk,mac" class="ex">
150     <li data-platform="atk,mac" class="ex">X</li>
151 </ol>
152 <!-- skipped <optgroup> -->
153 <!-- skipped <option> -->
154 <!-- skipped <output> -->
155 <p data-platform="atk,mac" class="ex">X</p>
156 <!-- skipped <param> -->
157 <pre data-platform="atk,mac" class="ex">X</pre>
158 <progress data-platform="atk,mac" class="ex" value="0.75">X</progress>
159 <q data-platform="atk,mac" class="ex">X</q>
160 <!-- skipped <ruby/rp/rt> -->
161 <s data-platform="atk,mac" class="ex">X</s>
162 <samp data-platform="atk,mac" class="ex">X</samp>
163 <!-- skipped <script> -->
164 <!-- http://webkit.org/b/109024 --><section data-platform="atk,mac" data-note=":not([aria-label]:not([aria-labelledby])" class="ex">X</section>
165 <section data-platform="atk,mac" class="ex" aria-label="x" data-note="[aria-label]">X</section>
166 <section data-platform="atk,mac" class="ex" aria-labelledby="section-label" data-note="[aria-labelledby]">
167     <h2 id="section-label">X</h2>
168 </section>
169 <select data-platform="atk,mac" class="ex" data-note=":not([multiple])">
170     <option data-platform="atk,mac" class="ex">X</option>
171     <optgroup data-platform="atk,mac" class="ex" label="more">
172         <option data-platform="atk,mac">X</option>
173     </optgroup>
174 </select>
175 <select data-platform="atk,mac" class="ex" multiple data-note="[multiple]">
176     <option data-platform="atk,mac" class="ex">X</option>
177     <optgroup data-platform="atk,mac" class="ex" label="more">
178         <option>Y</option>
179         <option>Z</option>
180     </optgroup>
181 </select>
182 <small data-platform="atk,mac" class="ex">X</small>
183 <!-- skipped <source> -->
184 <span data-platform="atk,mac" data-note=":not([onclick])" class="ex">X</span>
185 <span data-platform="atk,mac" onclick="return;" data-note="[onclick]" class="ex">X</span>
186 <strong data-platform="atk,mac" class="ex">X</strong>
187 <!-- skipped <style> -->
188 <sub data-platform="atk,mac" class="ex">X</sub>
189 <sup data-platform="atk,mac" class="ex">X</sup>
190 <svg data-platform="atk,mac" class="ex">X</svg>
191
192 <table data-platform="atk,mac" class="ex">
193     <caption data-platform="atk,mac" class="ex">X</caption>
194     <thead data-platform="atk,mac" class="ex">
195         <!-- [ATK] Object not exposed (webkit.org/b/139005) --><tr data-platform="atk,mac" class="ex">
196             <!-- Need separate test to verify colheader/rowheader -->
197             <th data-platform="atk,mac" class="ex">X</th>
198         </tr>
199     </thead>
200     <tbody data-platform="atk,mac" class="ex">
201         <!-- [ATK] Object not exposed (webkit.org/b/139005) --><tr data-platform="atk,mac" class="ex">
202             <td data-platform="atk,mac" class="ex">X</td>
203         </tr>
204     </tbody>
205     <tfoot data-platform="atk,mac" class="ex">
206         <!-- [ATK] Object not exposed (webkit.org/b/139005) --><tr data-platform="atk,mac" class="ex">
207             <!-- Need separate test to verify colheader/rowheader -->
208             <th data-platform="atk,mac" class="ex">X</th>
209         </tr>
210     </tfoot>
211 </table>
212 <textarea data-platform="atk,mac" class="ex">X</textarea>
213 <time data-platform="atk,mac" data-note=":not([datetime])" class="ex">X</time>
214 <time data-platform="atk,mac" datetime="2014-10-31 00:00" data-note="[datetime]" class="ex">X</time>
215 <!-- skipped <title> -->
216 <ul data-platform="atk,mac" class="ex">
217     <li data-platform="atk,mac" class="ex">X</li>
218 </ul>
219 <var data-platform="atk,mac" class="ex">X</var>
220 <!-- skipped <video> -->
221 <wbr data-platform="atk,mac" class="ex">X</wbr>
222 <!-- Todo: I left off adding HTML5 elements here at previous element: https://dvcs.w3.org/hg/html-api-map/raw-file/default/Overview.html -->
223
224
225
226 <!-- ==================================================================================================== -->
227 <!-- Abstract ARIA roles in alphabetical order; only generic AXGroup role should be exposed on abstract roles -->
228 <!-- ==================================================================================================== -->
229 <div role="command"     data-platform="atk,mac" class="ex">X</div>
230 <div role="composite"   data-platform="atk,mac" class="ex">X</div>
231 <div role="input"       data-platform="atk,mac" class="ex">X</div>
232 <div role="landmark"    data-platform="atk,mac" class="ex">X</div>
233 <div role="range"       data-platform="atk,mac" class="ex">X</div>
234 <div role="roletype"    data-platform="atk,mac" class="ex">X</div>
235 <div role="section"     data-platform="atk,mac" class="ex">X</div>
236 <div role="sectionhead" data-platform="atk,mac" class="ex">X</div>
237 <div role="select"      data-platform="atk,mac" class="ex">X</div>
238 <div role="structure"   data-platform="atk,mac" class="ex">X</div>
239 <div role="widget"      data-platform="atk,mac" class="ex">X</div>
240 <div role="window"      data-platform="atk,mac" class="ex">X</div>
241
242
243 <!-- ==================================================================================================== -->
244 <!-- Non-abstract ARIA roles in alphabetical order, excepting the need for nesting (e.g. row is with its grid parent) -->
245 <!-- ==================================================================================================== -->
246 <div role="alert"                    data-platform="atk,mac" class="ex">X</div>
247 <div role="alertdialog"              data-platform="atk,mac" class="ex">X</div>
248 <div role="application"              data-platform="atk,mac" class="ex">X</div>
249 <div role="article"                  data-platform="atk,mac" class="ex">X</div>
250 <div role="banner"                   data-platform="atk,mac" class="ex">X</div>
251 <div role="blockquote"               data-platform="atk,mac" class="ex">X</div>
252 <div role="button"                   data-platform="atk,mac" class="ex">X</div>
253 <div role="caption"                  data-platform="atk,mac" class="ex">X</div>
254 <div role="checkbox"                 data-platform="atk,mac" class="ex">X</div>
255 <div role="combobox"                 data-platform="atk,mac" class="ex">X</div>
256 <div role="complementary"            data-platform="atk,mac" class="ex">X</div>
257 <div role="contentinfo"              data-platform="atk,mac" class="ex">X</div>
258 <div role="definition"               data-platform="atk,mac" class="ex">X</div>
259 <div role="dialog"                   data-platform="atk,mac" class="ex">X</div>
260 <div role="directory"                data-platform="atk,mac" class="ex">X</div>
261 <!-- The 'doc-*' roles are defined the ARIA DPUB mobile: https://www.w3.org/TR/dpub-aam-1.0/ -->
262 <!-- Editor's draft is currently at https://rawgit.com/w3c/aria/master/dpub-aam/dpub-aam.html -->
263 <div role="doc-abstract"             data-platform="atk,mac" class="ex">X</div>
264 <div role="doc-acknowledgments"      data-platform="atk,mac" class="ex">X</div>
265 <div role="doc-afterword"            data-platform="atk,mac" class="ex">X</div>
266 <div role="doc-appendix"             data-platform="atk,mac" class="ex">X</div>
267 <div role="doc-backlink"             data-platform="atk,mac" class="ex">X</div>
268 <div role="doc-biblioentry"          data-platform="atk,mac" class="ex">X</div>
269 <div role="doc-bibliography"         data-platform="atk,mac" class="ex">X</div>
270 <div role="doc-biblioref"            data-platform="atk,mac" class="ex">X</div>
271 <div role="doc-chapter"              data-platform="atk,mac" class="ex">X</div>
272 <div role="doc-colophon"             data-platform="atk,mac" class="ex">X</div>
273 <div role="doc-conclusion"           data-platform="atk,mac" class="ex">X</div>
274 <div role="doc-cover"                data-platform="atk,mac" class="ex">X</div>
275 <div role="doc-credit"               data-platform="atk,mac" class="ex">X</div>
276 <div role="doc-credits"              data-platform="atk,mac" class="ex">X</div>
277 <div role="doc-dedication"           data-platform="atk,mac" class="ex">X</div>
278 <div role="doc-endnote"              data-platform="atk,mac" class="ex">X</div>
279 <div role="doc-endnotes"             data-platform="atk,mac" class="ex">X</div>
280 <div role="doc-epigraph"             data-platform="atk,mac" class="ex">X</div>
281 <div role="doc-epilogue"             data-platform="atk,mac" class="ex">X</div>
282 <div role="doc-errata"               data-platform="atk,mac" class="ex">X</div>
283 <div role="doc-example"              data-platform="atk,mac" class="ex">X</div>
284 <div role="doc-footnote"             data-platform="atk,mac" class="ex">X</div>
285 <div role="doc-foreword"             data-platform="atk,mac" class="ex">X</div>
286 <div role="doc-glossary"             data-platform="atk,mac" class="ex">X</div>
287 <div role="doc-glossref"             data-platform="atk,mac" class="ex">X</div>
288 <div role="doc-index"                data-platform="atk,mac" class="ex">X</div>
289 <div role="doc-introduction"         data-platform="atk,mac" class="ex">X</div>
290 <div role="doc-noteref"              data-platform="atk,mac" class="ex">X</div>
291 <div role="doc-notice"               data-platform="atk,mac" class="ex">X</div>
292 <div role="doc-pagebreak"            data-platform="atk,mac" class="ex">X</div>
293 <div role="doc-pagelist"             data-platform="atk,mac" class="ex">X</div>
294 <div role="doc-part"                 data-platform="atk,mac" class="ex">X</div>
295 <div role="doc-preface"              data-platform="atk,mac" class="ex">X</div>
296 <div role="doc-prologue"             data-platform="atk,mac" class="ex">X</div>
297 <div role="doc-pullquote"            data-platform="atk,mac" class="ex">X</div>
298 <div role="doc-qna"                  data-platform="atk,mac" class="ex">X</div>
299 <div role="doc-subtitle"             data-platform="atk,mac" class="ex">X</div>
300 <div role="doc-tip"                  data-platform="atk,mac" class="ex">X</div>
301 <div role="doc-toc"                  data-platform="atk,mac" class="ex">X</div>
302 <div role="document"                 data-platform="atk,mac" class="ex">X</div>
303 <div role="figure"                   data-platform="atk,mac" class="ex">X</div>
304 <div role="form"                     data-platform="atk,mac" class="ex">X</div>
305 <div role="graphics-document"        data-platform="atk,mac" class="ex">X</div>
306 <div role="graphics-object"          data-platform="atk,mac" class="ex">X</div>
307 <div role="graphics-symbol"          data-platform="atk,mac" class="ex">X</div>
308 <div role="grid"                     data-platform="atk,mac" class="ex">
309     <div role="rowgroup"             data-platform="atk,mac" class="ex">
310         <div role="row"              data-platform="atk,mac" class="ex">
311             <!-- Note: diff between rowheader, columnheader, and gridcell is in cross-reference from grid; need additional non-role verification in another test. -->
312             <div role="rowheader"    data-platform="atk,mac" class="ex">X</div>
313             <div role="columnheader" data-platform="atk,mac" class="ex">X</div>
314             <div role="gridcell"     data-platform="atk,mac" class="ex">X</div>
315         </div>
316     </div>
317 </div>
318 <div role="feed"                     data-platform="atk,mac" class="ex">X</div>
319 <div role="group"                    data-platform="atk,mac" class="ex">X</div>
320 <div role="heading"                  data-platform="atk,mac" class="ex">X</div>
321 <div role="img"                      data-platform="atk,mac" class="ex">X</div>
322 <div role="link"                     data-platform="atk,mac" class="ex">X</div>
323 <div role="list"                     data-platform="atk,mac" class="ex">
324     <div role="listitem"             data-platform="atk,mac" class="ex">X</div>
325 </div>
326 <div role="listbox"                  data-platform="atk,mac" class="ex">
327     <div role="option"               data-platform="atk,mac" class="ex">X</div>
328 </div>
329 <div role="log"                      data-platform="atk,mac" class="ex">X</div>
330 <div role="main"                     data-platform="atk,mac" class="ex">X</div>
331 <div role="marquee"                  data-platform="atk,mac" class="ex">X</div>
332 <div role="math"                     data-platform="atk,mac" class="ex">X</div>
333 <div role="menu"                     data-platform="atk,mac" class="ex">
334     <!-- Note: diff between menuitem types is an attribute; need additional non-role verification in another test. -->
335     <div role="menuitem"             data-platform="atk,mac" class="ex">X</div>
336     <div role="menuitemcheckbox"     data-platform="atk,mac" class="ex">X</div>
337     <div role="menuitemradio"        data-platform="atk,mac" class="ex">X</div>
338 </div>
339 <div role="menubar"                  data-platform="atk,mac" class="ex">
340     <!-- Note: diff between menuitem types is an attribute; need additional non-role verification in another test. -->
341     <div role="menuitem"             data-platform="atk,mac" class="ex">X</div>
342     <div role="menuitemcheckbox"     data-platform="atk,mac" class="ex">X</div>
343     <div role="menuitemradio"        data-platform="atk,mac" class="ex">X</div>
344 </div>
345 <div role="meter"                    data-platform="atk,mac" class="ex">X</div>
346 <div role="navigation"               data-platform="atk,mac" class="ex">X</div>
347 <div role="note"                     data-platform="atk,mac" class="ex">X</div>
348 <div role="paragraph"                data-platform="atk,mac" class="ex">X</div>
349 <div role="presentation"             data-platform="atk,mac" class="ex">X</div>
350 <div role="progressbar"              data-platform="atk,mac" class="ex">X</div>
351 <div role="radiogroup"               data-platform="atk,mac" class="ex">
352     <div role="radio"                data-platform="atk,mac" class="ex">X</div>
353 </div>
354 <div role="region"                   data-platform="atk,mac" class="ex" data-note=":not([aria-label]:not([aria-labelledby])">X</div>
355 <div role="region"                   data-platform="atk,mac" class="ex" aria-label="x" data-note="[aria-label]">X</div>
356 <div role="region"                   data-platform="atk,mac" class="ex" aria-labelledby="region-label" data-note="[aria-labelledby]">
357     <h2 id="region-label">X</h2>
358 </div>
359 <div role="scrollbar"                data-platform="atk,mac" class="ex">X</div>
360 <div role="search"                   data-platform="atk,mac" class="ex">X</div>
361 <div role="searchbox"                data-platform="atk,mac" class="ex">X</div>
362 <div role="separator"                data-platform="atk,mac" class="ex">X</div>
363 <div role="slider"                   data-platform="atk,mac" class="ex">X</div>
364 <div role="spinbutton"               data-platform="atk,mac" class="ex">X</div>
365 <div role="status"                   data-platform="atk,mac" class="ex">X</div>
366 <div role="switch"                   data-platform="atk,mac" class="ex">X</div>
367 <div role="tablist"                  data-platform="atk,mac" class="ex">
368     <div role="tab"                  data-platform="atk,mac" class="ex">X</div>
369 </div>
370 <div role="tabpanel"                 data-platform="atk,mac" class="ex">X</div>
371 <div role="term"                     data-platform="atk,mac" class="ex">X</div>
372 <div role="textbox"                  data-platform="atk,mac" class="ex">X</div>
373 <div role="timer"                    data-platform="atk,mac" class="ex">X</div>
374 <div role="toolbar"                  data-platform="atk,mac" class="ex">X</div>
375 <div role="tooltip"                  data-platform="atk,mac" class="ex">X</div>
376 <div role="tree"                     data-platform="atk,mac" class="ex">
377     <div role="treeitem"             data-platform="atk,mac" class="ex">X</div>
378     <div role="group"                data-platform="atk,mac" class="ex">
379         <div role="treeitem"         data-platform="atk,mac" class="ex">X</div>
380     </div>
381 </div>
382 <div role="treegrid"                 data-platform="atk,mac" class="ex">
383     <div role="rowgroup"             data-platform="atk,mac" class="ex">
384         <div role="row"              data-platform="atk,mac" class="ex">
385             <!-- Note: diff between rowheader, columnheader, and gridcell is in cross-reference from grid; need additional non-role verification in another test. -->
386             <div role="rowheader"    data-platform="atk,mac" class="ex">X</div>
387             <div role="columnheader" data-platform="atk,mac" class="ex">X</div>
388             <div role="gridcell"     data-platform="atk,mac" class="ex">X</div>
389         </div>
390     </div>
391 </div>
392
393 <div id="console"></div>
394 <script>
395 if (window.testRunner && window.accessibilityController) {
396     description("This tests that native elements and ARIA overrides result in the expected role, subrole and role description.")
397     var currentPlatform = accessibilityController.platformName;
398     var examples = document.querySelectorAll('.ex');
399     var indent = "\n      "; // newline and six spaces
400     var el, supportedPlatforms, ariaRole, axElement, role, subrole, roleDescription, output, result;
401     for (var i = 0, c = examples.length; i < c; i++) {
402         el = examples[i];
403
404         supportedPlatforms = el.getAttribute('data-platform');
405         if (!supportedPlatforms || supportedPlatforms.indexOf(currentPlatform) == -1)
406             continue;
407
408         el.id = 'ex' + i;
409         ariaRole = el.getAttribute('role');
410         axElement = accessibilityController.accessibleElementById(el.id);
411         if (axElement) {
412             role = axElement.role;
413             subrole = axElement.subrole;
414             roleDescription = axElement.roleDescription;
415         } else {
416             role = 'AXRole: ';
417             subrole = 'AXSubrole: ';
418             roleDescription = 'AXRoleDescription: ';
419         }
420
421         output = el.tagName.toLowerCase() + (ariaRole?("[role="+ariaRole+"]"):'');
422         if (el.getAttribute('data-note')) {
423             output += el.getAttribute('data-note');
424         }
425         output += indent;
426         output += role + indent;
427
428         // In the Mac platform more things than just the role
429         // are tested so we need to expand a bit the output.
430         if (currentPlatform == "mac")
431             output += subrole + indent + roleDescription + indent;
432
433         result = document.getElementById('console');
434         result.innerText += output + "\n";
435     }
436
437     // Once tests are complete, hide all the example markup.
438     examples = document.querySelectorAll('.ex');
439     for (var i = 0, c = examples.length; i < c; i++) {
440         el = examples[i];
441         if (el.style)
442             el.style.display = 'none';
443     }
444 }
445 </script>
446 <script src="../resources/js-test-post.js"></script>
447 </body>
448 </html>