OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/js-test.js"></script> | |
5 </head> | |
6 | |
7 <body data-role="document" aria-label="implicit document name"> | |
8 <div role="alert" aria-label="alert name">This is an alert</div> | |
9 | |
10 <div role="alertdialog" aria-label="alertdialog name">This is an alertdialog</ div> | |
dmazzoni
2014/12/17 06:24:19
I feel like a test of computed-name shouldn't iter
aboxhall
2014/12/18 04:34:47
I think both axes are valuable, actually - we defi
dmazzoni
2014/12/18 18:02:21
I think that the latest spec simplifies this, fina
aboxhall
2014/12/19 00:02:08
Acknowledged.
| |
11 | |
12 <div role="application" aria-label="application name">This is an application</ div> | |
13 | |
14 <div role="article" aria-label="article name">This is an article</div> | |
15 <article data-role="article" aria-label="implicit article name">This is an art icle</article> | |
16 | |
17 <div role="banner" aria-label="banner name">This is a banner</div> | |
18 <header data-role="banner" aria-label="implicit banner name">This is a banner< /header> | |
19 | |
20 <div role="button">button name</div> | |
21 <div role="button" aria-label="button name">This is a button</div> | |
22 <input type="button" value="implicit button name" data-role="button"> | |
23 <button data-role="button">implicit button name</button> | |
24 <button data-role="button" aria-label="implicit button name">This is a button< /button> | |
25 | |
26 <div role="complementary" data-knownFailure>complementary name</div> | |
27 <div role="complementary" aria-label="complementary name">This is a complement ary</div> | |
28 <aside data-role="complementary" data-knownFailure>implicit complementary name </aside> | |
29 <aside data-role="complementary" aria-label="implicit complementary name">This is a complementary</aside> | |
30 | |
31 <fieldset data-role="group" aria-label="implicit group name"> | |
32 <div role="checkbox">checkbox name</div> | |
33 <div role="checkbox" aria-label="checkbox name"></div> | |
34 <label for="check">implicit checkbox name</label> | |
35 <input type="checkbox" id="check" data-role="checkbox"> | |
36 </fieldset> | |
37 | |
38 <div role="dialog" aria-label="dialog name"></div> | |
39 <dialog data-role="dialog" aria-label="implicit dialog name" data-knownFailure >This is a dialog</dialog> | |
40 | |
41 <div role="directory" data-knownFailure>directory name</div> | |
42 <div role="directory" aria-label="directory name">This is a directory</div> | |
43 | |
44 <div role="grid" aria-label="grid name"> | |
45 <div role="row" aria-label="row name"> | |
46 <div role="columnheader" aria-label="columnheader name"> | |
47 This is a columnheader | |
48 </div> | |
49 </div> | |
50 <div role="row" aria-label="row name"> | |
51 <div role="gridcell" aria-label="gridcell name"> | |
52 This is a gridcell | |
53 </div> | |
54 </div> | |
55 </div> | |
56 | |
57 <div role="combobox" aria-label="combobox name">This is a combobox</div> | |
58 <input type="text" list="suggestions" data-role="combobox" aria-name="implicit combobox name" data-knownFailure> | |
59 <datalist id="suggestions"> | |
60 <option value="suggestion1" label="suggestion1"> | |
61 <option value="suggestion2" label="suggestion2"> | |
62 </datalist> | |
63 | |
64 <div role="definition" aria-label="definition name">This is a definition</div> | |
65 | |
66 <div role="document" aria-label="document name">This is a document</div> | |
67 | |
68 <div role="form" aria-label="form name">This is a form</div> | |
69 | |
70 <div role="group" aria-label="group name">This is a group</div> | |
71 <details data-role="group" aria-label="implicit group name"> | |
72 <summary>This is a summary</summary> | |
73 This is a group | |
74 </details> | |
75 | |
76 <div role="heading">heading name</div> | |
77 <div role="heading" aria-label="heading name">This is a heading</div> | |
78 <h1 data-role="heading">implicit heading name</h1> | |
79 <h2 data-role="heading">implicit heading name</h2> | |
80 <h3 data-role="heading">implicit heading name</h3> | |
81 <h4 data-role="heading">implicit heading name</h4> | |
82 <h5 data-role="heading">implicit heading name</h5> | |
83 <h6 data-role="heading">implicit heading name</h6> | |
84 | |
85 <div role="img" aria-label="img name">This is an img</div> | |
86 <img src="broken.png" data-role="img" alt="implicit img name"> | |
87 | |
88 <div role="link">link name</div> | |
89 <div role="link" aria-label="link name">This is a link</div> | |
90 <a href="#" data-role="link">implicit link name</a> | |
91 <map name="map"> | |
92 <area shape=rect coords="0, 0, 10, 10" href="#" data-role="link" aria-label= "implicit link name"> | |
93 </map> | |
94 | |
95 <div role="list" aria-label="list name">This is a list</div> | |
96 <ul data-role="list" aria-label="implicit list name"><li data-role="listitem"> implicit listitem name</li></ul> | |
97 <ol data-role="list" aria-label="implicit list name"><li data-role="listitem"> implicit listitem name</li></ol> | |
98 | |
99 <div role="listbox" aria-label="listbox name">This is a listbox</div> | |
100 <select data-role="listbox" size="1" aria-label="implicit listbox name"> | |
101 <option value="1">First option</option> | |
102 <option value="2">Second</option> | |
103 </select> | |
104 | |
105 <div role="log" aria-label="log name">This is a log</div> | |
106 | |
107 <div role="main" aria-label="main name">This is main</div> | |
108 <main data-role="main" aria-label="implicit main name">This is main</main> | |
109 | |
110 <div role="marquee" aria-label="marquee name">This is a marquee</div> | |
111 | |
112 <div role="math" aria-label="math name">This is math</div> | |
113 | |
114 <div role="menu" aria-label="menu name">This is a menu</div> | |
115 | |
116 <div role="menubar" aria-label="menubar name">This is a menubar</div> | |
117 | |
118 <div role="menuitem">menuitem name</div> | |
119 <div role="menuitem" aria-label="menuitem name">This is a menuitem</div> | |
120 <menu type="popup"> | |
121 <menuitem command="doSomething" data-role="menuitem" aria-label="implicit me nuitem name" data-knownFailure>This is a menuitem</menuitem> | |
122 </menu> | |
123 | |
124 <div role="menuitemcheckbox">menuitemcheckbox name</div> | |
125 <div role="menuitemcheckbox" aria-label="menuitemcheckbox name">This is a menu itemcheckbox</div> | |
126 | |
127 <div role="menuitemradio">menuitemradio name</div> | |
128 <div role="menuitemradio" aria-label="menuitemradio name">This is a menuitemra dio</div> | |
129 | |
130 <div role="navigation" aria-label="navigation name">This is a navigation</div> | |
131 <nav data-role="navigation" aria-label="implicit navigation name">This is a na vigation</nav> | |
132 | |
133 <div role="note" aria-label="note name">This is a note</div> | |
134 | |
135 <div role="option">option name</div> | |
136 <div role="option" aria-label="option name">This is an option</div> | |
137 <select multiple> | |
138 <option value="1" data-role="option" data-knownFailure>implicit option name< /option> | |
139 <option value="2" data-role="option" data-knownFailure>implicit option name< /option> | |
140 </select> | |
141 | |
142 <div role="progressbar" aria-label="progressbar name">This is a progressbar</d iv> | |
143 <progress data-role="progressbar" value="10" max="100" aria-label="implicit pr ogressbar name">implicit progressbar name</progress> | |
144 | |
145 <div role="radio">radio name</div> | |
146 <div role="radio" aria-label="radio name">This is a radiobutton</div> | |
147 <label for="radio">implicit radio name</label> | |
148 <input type="radio" data-role="radio" id="radio"> | |
149 | |
150 <div role="radiogroup" aria-label="radiogroup name">This is a radiogroup</div> | |
151 | |
152 <div role="region" aria-label="region name">This is a region</div> | |
153 <section data-role="region" aria-label="implicit region name">This is a region </section> | |
154 | |
155 <div role="scrollbar" aria-label="scrollbar name">This is a scrollbar</div> | |
156 | |
157 <div role="search" aria-label="search name">This is a search</div> | |
158 | |
159 <div role="separator" aria-label="separator name">This is a separator</div> | |
160 <hr data-role="separator" aria-label="implicit separator name"> | |
161 | |
162 <div role="slider" aria-label="slider name">This is a slider</div> | |
163 <label for="range">implicit slider name<label> | |
164 <input type="range" data-role="slider" value="5" max="10" id="range" data-know nFailure> | |
165 | |
166 <div role="spinbutton" aria-label="spinbutton name">This is a spinbutton</div> | |
167 <label for="number">implicit spinbutton name</label> | |
168 <input type="number" data-role="spinbutton" data-knownFailure> | |
169 | |
170 <div role="status" aria-label="status name">This is a status</div> | |
171 <output data-role="status" aria-label="implicit status name"></output> | |
172 | |
173 <div role="tablist" aria-label="tablist name"> | |
174 <div role="tab">tab name</div> | |
175 <div role="tab" aria-label="tab name">This is a tab</div> | |
176 </div> | |
177 | |
178 <div role="tabpanel" aria-label="tabpanel name">This is a tabpanel</div> | |
179 | |
180 <button role="text" data-knownFailure>text name</button> | |
181 | |
182 <div role="textbox" aria-label="textbox name">This is a textbox</div> | |
183 <input type="email" data-role="textbox" aria-label="implicit textbox name"> | |
184 <input type="password" data-role="textbox" aria-label="implicit textbox name"> | |
185 <input type="search" data-role="textbox" aria-label="implicit textbox name"> | |
186 <input type="tel" data-role="textbox" aria-label="implicit textbox name"> | |
187 <input type="text" data-role="textbox" aria-label="implicit textbox name"> | |
188 <input type="url" data-role="textbox" aria-label="implicit textbox name"> | |
189 | |
190 <div role="timer" aria-label="timer name">This is a timer</div> | |
191 | |
192 <div role="toolbar" aria-label="toolbar name">This is a toolbar</div> | |
193 <menu type="toolbar" data-role="toolbar" aria-label="implicit toolbar name"> | |
194 <menuitem onclick="location='help.html'" label="Help"> | |
195 <menuitem onclick="location='about.html'" label="About"> | |
196 </menu> | |
197 | |
198 <div role="tooltip" aria-label="tooltip name">This is a tooltip</div> | |
199 <div role="tooltip" data-knownFailure>tooltip name</div> | |
200 | |
201 <div role="tree" aria-label="tree name">This is a tree</div> | |
202 | |
203 <div role="treegrid" aria-label="treegrid name">This is a treegrid</div> | |
204 | |
205 <div role="treeitem" data-knownFailure>treeitem name</div> | |
206 <div role="treeitem" aria-label="treeitem name">This is a treeitem</div> | |
207 <script> | |
208 description(""); | |
209 | |
210 if (window.testRunner) { | |
211 testRunner.dumpAsText(); | |
212 | |
213 var roleElements = document.querySelectorAll('[role]'); | |
214 var rolesTested = {}; | |
215 for (var i = 0; i < roleElements.length; i++) { | |
216 var roleElement = roleElements[i]; | |
217 var name = roleElement.computedName; | |
218 var role = roleElement.getAttribute('role'); | |
219 if (!roleElement.hasAttribute('data-knownFailure')) { | |
220 var expectedNameString = '"' + role + ' name"'; | |
221 shouldBe('name', expectedNameString); | |
222 } | |
223 var implicitRoleElements = document.querySelectorAll('[data-role=' + rol e + ']'); | |
224 if (rolesTested[role]) | |
225 continue; | |
226 for (var j = 0; j < implicitRoleElements.length; j++) { | |
227 var implicitRoleElement = implicitRoleElements[j]; | |
228 if (!implicitRoleElement.hasAttribute('data-knownFailure')) { | |
229 var expectedNameString = '"implicit ' + role + ' name"'; | |
230 shouldBe('implicitRoleElement.computedName', expectedNameString) ; | |
231 } | |
232 } | |
233 rolesTested[role] = true; | |
234 } | |
235 } | |
236 </script> | |
dmazzoni
2014/12/17 06:24:19
Optional: I've seen some tests set display:none on
aboxhall
2014/12/18 04:34:47
Wouldn't that mess up the accessibility tree?
dmazzoni
2014/12/18 18:02:21
You'd do it after all of your accessibility tree t
aboxhall
2014/12/19 00:02:08
Oh I see, done.
| |
237 | |
238 </body> | |
239 </html> | |
OLD | NEW |