blob: 92a6082212edcc5c7fb95bd0469bc892a84123f4 [file] [log] [blame]
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +00001<!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<!-- This only tests elements that have an exact 1:1 ARIA role mapping, and computed role overrides. -->
9<!-- ==================================================================================================== -->
jdiggs@igalia.come93dbdf2016-07-08 18:01:55 +000010<div id="content">
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000011<a data-role="link" href="#" data-note="[href]" data-platform="atk,mac" class="ex">X</a>
12<article data-role="article" data-platform="atk,mac" class="ex">X</article>
13<aside data-role="complementary" data-platform="atk,mac" class="ex">X</aside>
14<button data-role="button" data-platform="atk,mac" class="ex">X</button>
repstein@apple.com6ac23692019-10-24 00:09:48 +000015<del data-role="deletion" data-platform="atk,mac" class="ex">X</ins>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000016<dfn data-role="definition" data-platform="atk,mac" class="ex">X</dfn>
17<dl data-role="" data-platform="atk,mac" class="ex">
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000018 <dt>X</dt>
19 <dd>X</dd>
20</dl>
cfleizach@apple.comf3928b52019-02-25 19:15:23 +000021<footer data-role="contentinfo" data-platform="atk,mac" class="ex">X</footer>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000022<form data-role="form" data-platform="atk,mac" class="ex">X</form>
23<header data-role="banner" data-platform="atk,mac" class="ex">X</header>
24<h1 data-role="heading" data-platform="atk,mac" class="ex">X</h1>
25<h2 data-role="heading" data-platform="atk,mac" class="ex">X</h2>
26<h3 data-role="heading" data-platform="atk,mac" class="ex">X</h3>
27<h4 data-role="heading" data-platform="atk,mac" class="ex">X</h4>
28<h5 data-role="heading" data-platform="atk,mac" class="ex">X</h5>
29<h5 data-role="heading" data-platform="atk,mac" class="ex">X</h6>
30<hr data-role="separator" data-platform="atk,mac" class="ex">
31<img data-role="img" data-platform="atk,mac" class="ex" data-note=":not([src]):not([alt])">
32<img data-role="" data-platform="atk,mac" class="ex" alt="" data-note="[alt='']">
33<img data-role="img" data-platform="atk,mac" class="ex" src="foo.png" data-note="[src]:not([alt])">
34<img data-role="img" data-platform="atk,mac" class="ex" alt="X" data-note="[alt='X']">
35<input type="button" value="X" data-role="button" data-platform="atk,mac" class="ex" data-note="[type='button']">
36<input type="checkbox" data-role="checkbox" data-platform="atk,mac" class="ex" data-note="[type='checkbox']">
37<input type="date" data-role=""data-platform="atk,mac" class="ex" data-note="[type='date']">
38<input type="datetime" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='datetime']">
39<input type="datetime-local" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='datetime-local']">
40<input type="email" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='email']">
41<input type="file" data-role="button" data-platform="atk,mac" class="ex" data-note="[type='file']">
42<input type="hidden" data-role="" data-platform="atk,mac" class="ex" data-note="[type='hidden']">
43<input type="image" data-role="button" data-platform="atk,mac" class="ex" data-note="[type='image']">
44<input type="month" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='month']">
45<input type="number" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='number']">
46<input type="password" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='password']">
47<input type="radio" data-role="radio" data-platform="atk,mac" class="ex" data-note="[type='radio']">
48<input type="range" data-role="slider" data-platform="atk,mac" class="ex" data-note="[type='range']">
49<input type="reset" data-role="button" data-platform="atk,mac" class="ex" data-note="[type='reset']">
50<input type="search" value="X" data-role="searchbox" data-platform="atk,mac" class="ex" data-note="[type='search']">
51<input type="submit" data-role="button" data-platform="atk,mac" class="ex" data-note="[type='submit']">
52<input type="tel" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='tel']">
53<input type="text" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='text']">
54<input type="time" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='time']">
55<input type="url" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='url']">
56<input type="week" value="X" data-role="" data-platform="atk,mac" class="ex" data-note="[type='week']">
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +000057<ins data-role="insertion" data-platform="atk,mac" class="ex">X</ins>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000058<mark data-role="" data-platform="atk,mac" class="ex">X</mark>
59<math data-role="math" data-platform="atk,mac" class="ex">X</math>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000060<!-- skipped <menu> -->
61<!-- skipped <meta> -->
jdiggs@igalia.com959318d2019-03-20 13:09:02 +000062<!-- renable for atk after http://webkit.org/b/163383 fixed --><meter data-role="meter" data-platform="mac" class="ex" value="0.75">X</meter>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000063<nav data-role="navigation" data-platform="atk,mac" class="ex">X</nav>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000064<!-- skipped <noscript> -->
65<!-- skipped <object> -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000066<ol data-role="list" data-platform="atk,mac" class="ex">
67 <li data-role="listitem" data-platform="atk,mac" class="ex">X</li>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000068</ol>
69<!-- skipped <optgroup> -->
70<!-- skipped <option> -->
71<!-- skipped <output> -->
jdiggs@igalia.com94d20202018-06-05 15:55:06 +000072<p data-role="paragraph" data-platform="atk,mac" class="ex">X</p>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000073<!-- skipped <param> -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000074<pre data-role="" data-platform="atk,mac" class="ex">X</pre>
75<progress data-role="progressbar" data-platform="atk,mac" class="ex" value="0.75">X</progress>
76<q data-role="" data-platform="atk,mac" class="ex">X</q>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000077<!-- skipped <ruby/rp/rt> -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000078<s data-role="" data-platform="atk,mac" class="ex">X</s>
79<samp data-role="" data-platform="atk,mac" class="ex">X</samp>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000080<!-- skipped <script> -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000081<section data-role="" data-platform="atk,mac" class="ex" data-note=":not([aria-label]:not([aria-labelledby])">X</section>
82<section data-role="region" data-platform="atk,mac" class="ex" aria-label="x" data-note="[aria-label]">X</section>
83<section data-role="region" data-platform="atk,mac" class="ex" aria-labelledby="section-label" data-note="[aria-labelledby]">
jdiggs@igalia.com571fd1a62016-05-04 12:54:59 +000084 <h2 id="section-label">X</h2>
85</section>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000086<select data-role="button" data-platform="atk,mac" class="ex" data-note=":not([multiple])">
87 <option data-role="" data-platform="atk,mac" class="ex">X</option>
88 <optgroup data-role="" data-platform="atk,mac" class="ex" label="more">
89 <option data-role="" data-platform="atk,mac" class="ex">X</option>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000090 </optgroup>
91</select>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000092<select data-role="listbox" data-platform="atk,mac" class="ex" multiple data-note="[multiple]">
93 <option data-role="option" data-platform="atk,mac" class="ex">X</option>
94 <optgroup data-role="option" data-platform="atk,mac" class="ex" label="more">
95 <option data-role="option" data-platform="atk,mac" class="ex">Y</option>
96 <option data-role="option" data-platform="atk,mac" class="ex">Z</option>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +000097 </optgroup>
98</select>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +000099<small data-role="" data-platform="atk,mac" class="ex">X</small>
100<span data-role="" data-platform="atk,mac" class="ex">X</span>
repstein@apple.com6ac23692019-10-24 00:09:48 +0000101<strong data-role="" data-platform="atk,mac" class="ex">X</strong>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000102<sub data-role="subscript" data-platform="atk,mac" class="ex">X</sub>
103<sup data-role="superscript" data-platform="atk,mac" class="ex">X</sup>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000104<svg data-role="" data-platform="atk,mac" class="ex">X</svg>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000105
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000106<table data-role="table" data-platform="atk,mac" class="ex">
jdiggs@igalia.com94d20202018-06-05 15:55:06 +0000107 <caption data-role="caption" data-platform="atk,mac" class="ex">X</caption>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000108 <thead data-role="rowgroup" data-platform="atk,mac" class="ex">
109 <tr data-role="row" data-platform="atk,mac" class="ex">
110 <th data-role="columnheader" data-platform="atk,mac" class="ex">X</th>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000111 </tr>
112 </thead>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000113 <tbody data-role="rowgroup" data-platform="atk,mac" class="ex">
114 <tr data-role="row" data-platform="atk,mac" class="ex">
115 <td data-role="cell" data-platform="atk,mac" class="ex">X</td>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000116 </tr>
117 </tbody>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000118 <tfoot data-role="rowgroup" data-platform="atk,mac" class="ex">
119 <tr data-role="row" data-platform="atk,mac" class="ex">
120 <td data-role="cell" data-platform="atk,mac" class="ex">X</td>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000121 </tr>
122 </tfoot>
123</table>
commit-queue@webkit.org893f27c2015-07-10 22:04:50 +0000124
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000125<table role="grid" data-role="grid" data-platform="atk,mac" class="ex">
126 <caption data-role="" data-platform="atk,mac" class="ex">X</caption>
127 <thead data-role="rowgroup" data-platform="atk,mac" class="ex">
128 <tr data-role="row" data-platform="atk,mac" class="ex">
129 <th data-role="columnheader" data-platform="atk,mac" class="ex">X</th>
commit-queue@webkit.org893f27c2015-07-10 22:04:50 +0000130 </tr>
131 </thead>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000132 <tbody data-role="rowgroup" data-platform="atk,mac" class="ex">
133 <tr data-role="row" data-platform="atk,mac" class="ex">
134 <td role="gridcell" data-role="gridcell" data-platform="atk,mac" class="ex">X</td>
commit-queue@webkit.org893f27c2015-07-10 22:04:50 +0000135 </tr>
136 </tbody>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000137 <tfoot data-role="rowgroup" data-platform="atk,mac" class="ex">
138 <tr data-role="row" data-platform="atk,mac" class="ex">
139 <td role="gridcell" data-role="gridcell" data-platform="atk,mac" class="ex">X</td>
commit-queue@webkit.org893f27c2015-07-10 22:04:50 +0000140 </tr>
141 </tfoot>
142</table>
143
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000144<textarea data-role="textbox" data-platform="atk,mac" class="ex">X</textarea>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000145<time data-role="time" data-platform="atk,mac" class="ex">X</time>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000146<ul data-role="list" data-platform="atk,mac" class="ex">
147 <li data-role="listitem" data-platform="atk,mac" class="ex">X</li>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000148</ul>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000149<var data-role="" data-platform="atk,mac" class="ex">X</var>
150<wbr data-role="" data-platform="atk,mac" class="ex">X</wbr>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000151
152<!-- ==================================================================================================== -->
153<!-- Abstract ARIA roles in alphabetical order; only generic role should be exposed on abstract roles -->
154<!-- ==================================================================================================== -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000155<div role="command" data-role="" data-platform="atk,mac" class="ex">X</div>
156<div role="composite" data-role="" data-platform="atk,mac" class="ex">X</div>
157<div role="input" data-role="" data-platform="atk,mac" class="ex">X</div>
158<div role="landmark" data-role="" data-platform="atk,mac" class="ex">X</div>
159<div role="range" data-role="" data-platform="atk,mac" class="ex">X</div>
160<div role="roletype" data-role="" data-platform="atk,mac" class="ex">X</div>
161<div role="section" data-role="" data-platform="atk,mac" class="ex">X</div>
162<div role="sectionhead" data-role="" data-platform="atk,mac" class="ex">X</div>
163<div role="select" data-role="" data-platform="atk,mac" class="ex">X</div>
164<div role="structure" data-role="" data-platform="atk,mac" class="ex">X</div>
165<div role="widget" data-role="" data-platform="atk,mac" class="ex">X</div>
166<div role="window" data-role="" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000167
168
169<!-- ==================================================================================================== -->
170<!-- Non-abstract ARIA roles in alphabetical order, excepting the need for nesting (e.g. row is with its grid parent) -->
171<!-- ==================================================================================================== -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000172<div role="alert" data-role="alert" data-platform="atk,mac" class="ex">X</div>
173<div role="alertdialog" data-role="alertdialog" data-platform="atk,mac" class="ex">X</div>
174<div role="application" data-role="application" data-platform="atk,mac" class="ex">X</div>
175<div role="article" data-role="article" data-platform="atk,mac" class="ex">X</div>
176<div role="banner" data-role="banner" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com94d20202018-06-05 15:55:06 +0000177<div role="blockquote" data-role="blockquote" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000178<div role="button" data-role="button" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com94d20202018-06-05 15:55:06 +0000179<div role="caption" data-role="caption" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000180<div role="checkbox" data-role="checkbox" data-platform="atk,mac" class="ex">X</div>
181<div role="combobox" data-role="combobox" data-platform="atk,mac" class="ex">X</div>
182<div role="complementary" data-role="complementary" data-platform="atk,mac" class="ex">X</div>
183<div role="contentinfo" data-role="contentinfo" data-platform="atk,mac" class="ex">X</div>
184<div role="definition" data-role="definition" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000185<div role="deletion" data-role="deletion" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000186<div role="dialog" data-role="dialog" data-platform="atk,mac" class="ex">X</div>
187<div role="directory" data-role="list" data-platform="atk,mac" class="ex">X</div><!-- FIXME: should be directory -->
188<div role="document" data-role="document" data-platform="atk,mac" class="ex">X</div>
189<div role="figure" data-role="figure" data-platform="atk,mac" class="ex">X</div>
190<div role="form" data-role="form" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com3e7e23a2018-01-22 19:16:52 +0000191<div role="graphics-document" data-role="document" data-platform="atk,mac" class="ex">X</div>
192<div role="graphics-object" data-role="group" data-platform="atk,mac" class="ex">X</div>
193<div role="graphics-symbol" data-role="img" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000194<div role="grid" data-role="grid" data-platform="atk,mac" class="ex">
195 <div role="rowgroup" data-role="rowgroup" data-platform="atk,mac" class="ex">
196 <div role="row" data-role="row" data-platform="atk,mac" class="ex">
197 <div role="rowheader" data-role="rowheader" data-platform="atk,mac" class="ex">X</div>
198 <div role="columnheader" data-role="columnheader" data-platform="atk,mac" class="ex">X</div>
199 <div role="gridcell" data-role="gridcell" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000200 </div>
201 </div>
202</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000203<div role="feed" data-role="feed" data-platform="atk,mac" class="ex">X</div>
204<div role="group" data-role="group" data-platform="atk,mac" class="ex">X</div>
205<div role="heading" data-role="heading" data-platform="atk,mac" class="ex">X</div>
206<div role="img" data-role="img" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000207<div role="insertion" data-role="insertion" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000208<div role="link" data-role="link" data-platform="atk,mac" class="ex">X</div>
209<div role="list" data-role="list" data-platform="atk,mac" class="ex">
210 <div role="listitem" data-role="listitem" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000211</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000212<div role="listbox" data-role="listbox" data-platform="atk,mac" class="ex">
213 <div role="option" data-role="option" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000214</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000215<div role="log" data-role="log" data-platform="atk,mac" class="ex">X</div>
216<div role="main" data-role="main" data-platform="atk,mac" class="ex">X</div>
217<div role="marquee" data-role="marquee" data-platform="atk,mac" class="ex">X</div>
218<div role="math" data-role="math" data-platform="atk,mac" class="ex">X</div>
219<div role="menu" data-role="menu" data-platform="atk,mac" class="ex">
220 <div role="menuitem" data-role="menuitem" data-platform="atk,mac" class="ex">X</div>
221 <div role="menuitemcheckbox" data-role="menuitemcheckbox" data-platform="atk,mac" class="ex">X</div>
222 <div role="menuitemradio" data-role="menuitemradio" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000223</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000224<div role="menubar" data-role="menubar" data-platform="atk,mac" class="ex">
225 <div role="menuitem" data-role="menuitem" data-platform="atk,mac" class="ex">X</div>
226 <div role="menuitemcheckbox" data-role="menuitemcheckbox" data-platform="atk,mac" class="ex">X</div>
227 <div role="menuitemradio" data-role="menuitemradio" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000228</div>
jdiggs@igalia.com959318d2019-03-20 13:09:02 +0000229<div role="meter" data-role="meter" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000230<div role="navigation" data-role="navigation" data-platform="atk,mac" class="ex">X</div>
231<div role="note" data-role="note" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com94d20202018-06-05 15:55:06 +0000232<div role="paragraph" data-role="paragraph" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000233<div role="presentation" data-role="" data-platform="atk,mac" class="ex">X</div>
234<div role="progressbar" data-role="progressbar" data-platform="atk,mac" class="ex">X</div>
235<div role="radiogroup" data-role="radiogroup" data-platform="atk,mac" class="ex">
236 <div role="radio" data-role="radio" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000237</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000238<div role="region" data-platform="atk,mac" class="ex" data-role="" data-note=":not([aria-label]:not([aria-labelledby])">X</div>
239<div role="region" data-platform="atk,mac" class="ex" data-role="region" aria-label="x" data-note="[aria-label]">X</div>
240<div role="region" data-platform="atk,mac" class="ex" data-role="region" aria-labelledby="region-label" data-note="[aria-labelledby]">
jdiggs@igalia.comcba48112017-04-29 02:07:21 +0000241 <h2 id="region-label">X</h2>
242</div>
243
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000244<div role="scrollbar" data-role="scrollbar" data-platform="atk,mac" class="ex">X</div>
245<div role="search" data-role="search" data-platform="atk,mac" class="ex">X</div>
246<div role="separator" data-role="separator" data-platform="atk,mac" class="ex">X</div>
247<div role="slider" data-role="slider" data-platform="atk,mac" class="ex">X</div>
248<div role="spinbutton" data-role="spinbutton" data-platform="atk,mac" class="ex">X</div>
249<div role="status" data-role="status" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000250<div role="subscript" data-role="subscript" data-platform="atk,mac" class="ex">X</div>
251<div role="superscript" data-role="superscript" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000252<div role="tablist" data-role="tablist" data-platform="atk,mac" class="ex">
253 <div role="tab" data-role="tab" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000254</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000255<div role="tabpanel" data-role="tabpanel" data-platform="atk,mac" class="ex">X</div>
256<div role="textbox" data-role="" data-platform="atk,mac" class="ex">X</div><!-- FIXME: should be textbox -->
257<div role="term" data-role="term" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com69e004a2019-07-11 13:36:50 +0000258<div role="time" data-role="time" data-platform="atk,mac" class="ex">X</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000259<div role="timer" data-role="timer" data-platform="atk,mac" class="ex">X</div>
260<div role="toolbar" data-role="toolbar" data-platform="atk,mac" class="ex">X</div>
261<div role="tooltip" data-role="tooltip" data-platform="atk,mac" class="ex">X</div>
262<div role="tree" data-role="tree" data-platform="atk,mac" class="ex">
263 <div role="treeitem" data-role="treeitem" data-platform="atk,mac" class="ex">X</div>
264 <div role="group" data-role="group" data-platform="atk,mac" class="ex">
265 <div role="treeitem" data-role="treeitem" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000266 </div>
267</div>
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000268<div role="treegrid" data-role="treegrid" data-platform="atk,mac" class="ex">
269 <div role="rowgroup" data-role="rowgroup" data-platform="atk,mac" class="ex">
270 <div role="row" data-role="row" data-platform="atk,mac" class="ex">
271 <div role="rowheader" data-role="rowheader" data-platform="atk,mac" class="ex">X</div>
272 <div role="columnheader" data-role="columnheader" data-platform="atk,mac" class="ex">X</div>
273 <div role="gridcell" data-role="gridcell" data-platform="atk,mac" class="ex">X</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000274 </div>
275 </div>
276</div>
277
278
279<!-- ==================================================================================================== -->
280<!-- generic role attribute parsing tests -->
281<!-- ==================================================================================================== -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000282<div role="button foo" data-role="button" data-platform="atk,mac" class="ex">X</div>
283<div role="foo button bar" data-role="button" data-platform="atk,mac" class="ex">X</div>
284<div role="foo button bar" data-role="button" data-platform="atk,mac" class="ex">X</div><!-- [sic] Two spaces in role string -->
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000285
286<!-- FIXME: These two should be button but fail b/c of http://webkit.org/b/128400 -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000287<div role="foo button bar" data-role="" data-platform="atk,mac" class="ex">X</div><!-- [sic] Tab chars in role string -->
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000288<div role="foo
289button
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000290bar" data-role="" data-platform="atk,mac" class="ex">X</div><!-- [sic] Newlines in role string -->
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000291
292
293<!-- ==================================================================================================== -->
294<!-- implicit role parsing tests -->
295<!-- ==================================================================================================== -->
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000296<img role="foo" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex">
297<img role="foo bar" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex">
298<img role="foo bar" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex"><!-- [sic] Two spaces in role string -->
299<img role="foo bar" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex"><!-- [sic] Newline in role string -->
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000300<img role="foo
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000301bar" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex"><!-- [sic] Tab char in role string -->
302<img role="text" src="foo.png" data-role="text" alt="X" data-platform="atk,mac" class="ex">
303<img role="text img" src="foo.png" data-role="text" alt="X" data-platform="atk,mac" class="ex">
304<img role="img text" src="foo.png" data-role="img" alt="X" data-platform="atk,mac" class="ex">
305<img role="presentation" data-role="img" data-note="[aria-label]" alt="X" src="foo.png" aria-label="X" data-platform="atk,mac" class="ex"><!-- presentation with global attr should fallback to implicit role -->
306<a href="#" role="foo bar" data-role="link" data-platform="atk,mac" class="ex">X</a>
jdiggs@igalia.come93dbdf2016-07-08 18:01:55 +0000307</div>
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000308
309<div id="console"></div>
310<script>
311if (window.testRunner && window.accessibilityController) {
312 description("This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.")
313 var examples = document.querySelectorAll(".ex");
314 var el, contentAttrRoleString, axElement, computedAriaRole, output, expectedRole, expectation, result, note;
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000315 var currentPlatform = accessibilityController.platformName;
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000316 for (var i = 0, c = examples.length; i < c; i++) {
317 el = examples[i];
318 el.id = "ex" + i
319
320 axElement = accessibilityController.accessibleElementById(el.id);
321 if (!axElement)
322 continue;
323
jdiggs@igalia.com329c6a352018-01-18 20:39:12 +0000324 supportedPlatforms = el.getAttribute('data-platform');
325 if (!supportedPlatforms || supportedPlatforms.indexOf(currentPlatform) == -1)
326 continue;
327
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000328 computedAriaRole = axElement.computedRoleString;
329
330 contentAttrRoleString = el.getAttribute("role");
331 note = el.getAttribute("data-note")
332 output = el.tagName.toLowerCase() + (contentAttrRoleString ? ("[role=\""+contentAttrRoleString+"\"]") : "") + (note ? note : "");
333 output += " -> ";
334 output += computedAriaRole;
335 output += ". ";
336
337 expectedRole = "";
338 if (el.hasAttribute("data-role")) {
339 expectedRole = el.getAttribute("data-role");
340 }
341
342 expectation = expectedRole;
343 matchedResults = (computedAriaRole == expectedRole)
344
345 result = document.getElementById('console');
346 if (matchedResults) {
347 result.innerText += "PASS: " + output + "\n";
348 } else {
349 result.innerText += "FAIL: " + output + "Expected: " + expectation + ".\n";
350 }
351 }
352
353 // Once tests are complete, hide all the example markup.
jdiggs@igalia.come93dbdf2016-07-08 18:01:55 +0000354 document.getElementById("content").style.visibility = "hidden";
commit-queue@webkit.orge5beda22014-02-11 19:27:12 +0000355}
356</script>
357<script src="../resources/js-test-post.js"></script>
358</body>
359</html>