Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>HTML a11y spec tests</title> |
michael@0 | 5 | <link id="link" rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="../common.js"></script> |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../actions.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../role.js"></script> |
michael@0 | 17 | <script type="application/javascript" |
michael@0 | 18 | src="../states.js"></script> |
michael@0 | 19 | <script type="application/javascript" |
michael@0 | 20 | src="../attributes.js"></script> |
michael@0 | 21 | <script type="application/javascript" |
michael@0 | 22 | src="../relations.js"></script> |
michael@0 | 23 | <script type="application/javascript" |
michael@0 | 24 | src="../name.js"></script> |
michael@0 | 25 | |
michael@0 | 26 | <script type="application/javascript"> |
michael@0 | 27 | function doTest() |
michael@0 | 28 | { |
michael@0 | 29 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 30 | // HTML:a@href |
michael@0 | 31 | |
michael@0 | 32 | var obj = { |
michael@0 | 33 | role: ROLE_LINK, |
michael@0 | 34 | states: STATE_LINKED, |
michael@0 | 35 | actions: "jump", |
michael@0 | 36 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText, nsIAccessibleHyperLink ], |
michael@0 | 37 | children: [ // all kids inherits linked state and jump action |
michael@0 | 38 | { |
michael@0 | 39 | role: ROLE_TEXT_LEAF, |
michael@0 | 40 | states: STATE_LINKED, |
michael@0 | 41 | actions: "jump" |
michael@0 | 42 | } |
michael@0 | 43 | ] |
michael@0 | 44 | }; |
michael@0 | 45 | testElm("a_href", obj); |
michael@0 | 46 | |
michael@0 | 47 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 48 | // HTML:a no @href |
michael@0 | 49 | |
michael@0 | 50 | obj = { |
michael@0 | 51 | todo_role: ROLE_TEXT_CONTAINER, |
michael@0 | 52 | absentStates: STATE_LINKED, |
michael@0 | 53 | actions: null, |
michael@0 | 54 | children: [ |
michael@0 | 55 | { |
michael@0 | 56 | role: ROLE_TEXT_LEAF, |
michael@0 | 57 | absentStates: STATE_LINKED, |
michael@0 | 58 | actions: null |
michael@0 | 59 | } |
michael@0 | 60 | ] |
michael@0 | 61 | }; |
michael@0 | 62 | testElm("a_nohref", obj); |
michael@0 | 63 | |
michael@0 | 64 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 65 | // HTML:abbr contained by HTML:td |
michael@0 | 66 | |
michael@0 | 67 | obj = { |
michael@0 | 68 | role: ROLE_CELL, |
michael@0 | 69 | attributes: { abbr: "WWW" }, |
michael@0 | 70 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 71 | children: [ |
michael@0 | 72 | { |
michael@0 | 73 | role: ROLE_TEXT_CONTAINER, |
michael@0 | 74 | children: [ { role: ROLE_TEXT_LEAF } ] |
michael@0 | 75 | } |
michael@0 | 76 | ] |
michael@0 | 77 | }; |
michael@0 | 78 | testElm("td_abbr", obj); |
michael@0 | 79 | |
michael@0 | 80 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 81 | // HTML:address |
michael@0 | 82 | |
michael@0 | 83 | obj = { |
michael@0 | 84 | todo_role: ROLE_PARAGRAPH, |
michael@0 | 85 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 86 | }; |
michael@0 | 87 | testElm("address", obj); |
michael@0 | 88 | |
michael@0 | 89 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 90 | // HTML:area@href |
michael@0 | 91 | |
michael@0 | 92 | obj = { |
michael@0 | 93 | role: ROLE_LINK, |
michael@0 | 94 | states: STATE_LINKED, |
michael@0 | 95 | actions: "jump", |
michael@0 | 96 | interfaces: [ nsIAccessibleHyperLink ], |
michael@0 | 97 | children: [] |
michael@0 | 98 | }; |
michael@0 | 99 | testElm(getAccessible("imgmap").firstChild, obj); |
michael@0 | 100 | |
michael@0 | 101 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 102 | // HTML:area no @href |
michael@0 | 103 | |
michael@0 | 104 | obj = { |
michael@0 | 105 | todo_role: "ROLE_SHAPE", |
michael@0 | 106 | absentStates: STATE_LINKED, |
michael@0 | 107 | children: [] |
michael@0 | 108 | }; |
michael@0 | 109 | testElm(getAccessible("imgmap").lastChild, obj); |
michael@0 | 110 | |
michael@0 | 111 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 112 | // HTML:article |
michael@0 | 113 | obj = { |
michael@0 | 114 | role: ROLE_DOCUMENT, |
michael@0 | 115 | states: STATE_READONLY, |
michael@0 | 116 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 117 | }; |
michael@0 | 118 | testElm("article", obj); |
michael@0 | 119 | |
michael@0 | 120 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 121 | // HTML:aside |
michael@0 | 122 | obj = { |
michael@0 | 123 | role: ROLE_NOTE, |
michael@0 | 124 | attributes: { "xml-roles": "complementary" }, |
michael@0 | 125 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 126 | }; |
michael@0 | 127 | testElm("aside", obj); |
michael@0 | 128 | |
michael@0 | 129 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 130 | obj = { // HTML:audio |
michael@0 | 131 | role: ROLE_GROUPING |
michael@0 | 132 | }; |
michael@0 | 133 | testElm("audio", obj); |
michael@0 | 134 | |
michael@0 | 135 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 136 | obj = { // HTML:b contained by paragraph |
michael@0 | 137 | role: ROLE_PARAGRAPH, |
michael@0 | 138 | textAttrs: { |
michael@0 | 139 | 0: { }, |
michael@0 | 140 | 6: { "font-weight": kBoldFontWeight } |
michael@0 | 141 | }, |
michael@0 | 142 | children: [ |
michael@0 | 143 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 144 | { role: ROLE_TEXT_LEAF } // HTML:b text |
michael@0 | 145 | ] |
michael@0 | 146 | } |
michael@0 | 147 | testElm("b_container", obj); |
michael@0 | 148 | |
michael@0 | 149 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 150 | obj = { // HTML:bdi contained by paragraph |
michael@0 | 151 | role: ROLE_PARAGRAPH, |
michael@0 | 152 | todo_textAttrs: { |
michael@0 | 153 | 0: { }, |
michael@0 | 154 | 5: { "writing-mode": "rl" }, |
michael@0 | 155 | 8: { } |
michael@0 | 156 | }, |
michael@0 | 157 | children: [ |
michael@0 | 158 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 159 | { role: ROLE_TEXT_LEAF }, // HTML:bdi text |
michael@0 | 160 | { role: ROLE_TEXT_LEAF } // plain text |
michael@0 | 161 | ] |
michael@0 | 162 | } |
michael@0 | 163 | testElm("bdi_container", obj); |
michael@0 | 164 | |
michael@0 | 165 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 166 | // HTML:bdo contained by paragraph |
michael@0 | 167 | |
michael@0 | 168 | obj = { |
michael@0 | 169 | role: ROLE_PARAGRAPH, |
michael@0 | 170 | todo_textAttrs: { |
michael@0 | 171 | 0: { }, |
michael@0 | 172 | 6: { "writing-mode": "rl" } |
michael@0 | 173 | }, |
michael@0 | 174 | children: [ |
michael@0 | 175 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 176 | ] |
michael@0 | 177 | } |
michael@0 | 178 | testElm("bdo_container", obj); |
michael@0 | 179 | |
michael@0 | 180 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 181 | // HTML:blockquote |
michael@0 | 182 | |
michael@0 | 183 | obj = { |
michael@0 | 184 | role: ROLE_SECTION, |
michael@0 | 185 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 186 | children: [ { role: ROLE_PARAGRAPH } ] |
michael@0 | 187 | }; |
michael@0 | 188 | testElm("blockquote", obj); |
michael@0 | 189 | |
michael@0 | 190 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 191 | // HTML:br |
michael@0 | 192 | |
michael@0 | 193 | obj = { |
michael@0 | 194 | role: ROLE_PARAGRAPH, |
michael@0 | 195 | children: [ { role: ROLE_WHITESPACE } ] |
michael@0 | 196 | }; |
michael@0 | 197 | testElm("br_container", obj); |
michael@0 | 198 | |
michael@0 | 199 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 200 | obj = { // HTML:button |
michael@0 | 201 | role: ROLE_PUSHBUTTON, |
michael@0 | 202 | absentStates: STATE_DEFAULT, |
michael@0 | 203 | actions: "press", |
michael@0 | 204 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 205 | }; |
michael@0 | 206 | testElm("button", obj); |
michael@0 | 207 | |
michael@0 | 208 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 209 | // HTML:button@type="submit" (default button) |
michael@0 | 210 | |
michael@0 | 211 | obj = { |
michael@0 | 212 | role: ROLE_PUSHBUTTON, |
michael@0 | 213 | states: STATE_DEFAULT, |
michael@0 | 214 | actions: "press" |
michael@0 | 215 | }; |
michael@0 | 216 | testElm("button_default", obj); |
michael@0 | 217 | |
michael@0 | 218 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 219 | // HTML:canvas |
michael@0 | 220 | |
michael@0 | 221 | obj = { |
michael@0 | 222 | role: ROLE_CANVAS |
michael@0 | 223 | }; |
michael@0 | 224 | testElm("canvas", obj); |
michael@0 | 225 | |
michael@0 | 226 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 227 | // HTML:caption under table |
michael@0 | 228 | |
michael@0 | 229 | obj = { |
michael@0 | 230 | role: ROLE_TABLE, |
michael@0 | 231 | relations: { |
michael@0 | 232 | RELATION_LABELLED_BY: "caption" |
michael@0 | 233 | }, |
michael@0 | 234 | interfaces: nsIAccessibleTable, |
michael@0 | 235 | children: [ |
michael@0 | 236 | { |
michael@0 | 237 | role: ROLE_CAPTION, |
michael@0 | 238 | relations: { |
michael@0 | 239 | RELATION_LABEL_FOR: "table" |
michael@0 | 240 | }, |
michael@0 | 241 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 242 | }, |
michael@0 | 243 | { // td inside thead |
michael@0 | 244 | role: ROLE_ROW, |
michael@0 | 245 | children: [ |
michael@0 | 246 | { |
michael@0 | 247 | role: ROLE_COLUMNHEADER, |
michael@0 | 248 | interfaces: [ nsIAccessibleTableCell, nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 249 | }, |
michael@0 | 250 | { role: ROLE_COLUMNHEADER } |
michael@0 | 251 | ] |
michael@0 | 252 | }, |
michael@0 | 253 | { // td inside tbody |
michael@0 | 254 | role: ROLE_ROW, |
michael@0 | 255 | children: [ |
michael@0 | 256 | { |
michael@0 | 257 | role: ROLE_ROWHEADER, |
michael@0 | 258 | interfaces: [ nsIAccessibleTableCell, nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 259 | }, |
michael@0 | 260 | { |
michael@0 | 261 | role: ROLE_CELL, |
michael@0 | 262 | interfaces: [ nsIAccessibleTableCell, nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 263 | } |
michael@0 | 264 | ] |
michael@0 | 265 | }, |
michael@0 | 266 | { // td inside tfoot |
michael@0 | 267 | role: ROLE_ROW |
michael@0 | 268 | } |
michael@0 | 269 | ] |
michael@0 | 270 | }; |
michael@0 | 271 | testElm("table", obj); |
michael@0 | 272 | |
michael@0 | 273 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 274 | // HTML:cite contained by paragraph |
michael@0 | 275 | |
michael@0 | 276 | obj = { |
michael@0 | 277 | role: ROLE_PARAGRAPH, |
michael@0 | 278 | textAttrs: { |
michael@0 | 279 | 0: { }, |
michael@0 | 280 | 6: { "font-style": "italic" } |
michael@0 | 281 | }, |
michael@0 | 282 | children: [ |
michael@0 | 283 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 284 | { role: ROLE_TEXT_LEAF } // HTML:cite text |
michael@0 | 285 | ] |
michael@0 | 286 | }; |
michael@0 | 287 | testElm("cite_container", obj); |
michael@0 | 288 | |
michael@0 | 289 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 290 | // HTML:code contained by paragraph |
michael@0 | 291 | |
michael@0 | 292 | obj = { |
michael@0 | 293 | role: ROLE_PARAGRAPH, |
michael@0 | 294 | textAttrs: { |
michael@0 | 295 | 0: { }, |
michael@0 | 296 | 6: { "font-family": kMonospaceFontFamily } |
michael@0 | 297 | }, |
michael@0 | 298 | children: [ |
michael@0 | 299 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 300 | { role: ROLE_TEXT_LEAF } // HTML:code text |
michael@0 | 301 | ] |
michael@0 | 302 | }; |
michael@0 | 303 | testElm("code_container", obj); |
michael@0 | 304 | |
michael@0 | 305 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 306 | // HTML:col and HTML:colgroup under table |
michael@0 | 307 | |
michael@0 | 308 | obj = |
michael@0 | 309 | { TABLE : [ |
michael@0 | 310 | { ROW :[ |
michael@0 | 311 | { role: ROLE_CELL }, |
michael@0 | 312 | { role: ROLE_CELL }, |
michael@0 | 313 | { role: ROLE_CELL } |
michael@0 | 314 | ] } |
michael@0 | 315 | ] }; |
michael@0 | 316 | testElm("colNcolgroup_table", obj); |
michael@0 | 317 | |
michael@0 | 318 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 319 | // HTML:data contained by paragraph |
michael@0 | 320 | |
michael@0 | 321 | obj = |
michael@0 | 322 | { PARAGRAPH: [ |
michael@0 | 323 | { TEXT_LEAF: [] } // HTML:data text |
michael@0 | 324 | ] }; |
michael@0 | 325 | testElm("data_container", obj); |
michael@0 | 326 | |
michael@0 | 327 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 328 | // HTML:datalist associated with input |
michael@0 | 329 | |
michael@0 | 330 | todo(false, "datalist and summary tree hierarchy test missed"); |
michael@0 | 331 | |
michael@0 | 332 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 333 | // HTML:dd, HTML:dl, HTML:dd |
michael@0 | 334 | |
michael@0 | 335 | obj = { |
michael@0 | 336 | role: ROLE_DEFINITION_LIST, |
michael@0 | 337 | states: STATE_READONLY, |
michael@0 | 338 | children: [ // dl |
michael@0 | 339 | { |
michael@0 | 340 | role: ROLE_TERM, |
michael@0 | 341 | states: STATE_READONLY, |
michael@0 | 342 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 343 | children: [ // dt |
michael@0 | 344 | { role: ROLE_TEXT_LEAF } |
michael@0 | 345 | ] |
michael@0 | 346 | }, |
michael@0 | 347 | { |
michael@0 | 348 | role: ROLE_DEFINITION, |
michael@0 | 349 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 350 | children: [ // dd |
michael@0 | 351 | { role: ROLE_TEXT_LEAF } |
michael@0 | 352 | ] |
michael@0 | 353 | } |
michael@0 | 354 | ] |
michael@0 | 355 | }; |
michael@0 | 356 | testElm("dl", obj); |
michael@0 | 357 | |
michael@0 | 358 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 359 | // HTML:del contained by paragraph |
michael@0 | 360 | |
michael@0 | 361 | obj = { |
michael@0 | 362 | role: ROLE_PARAGRAPH, |
michael@0 | 363 | textAttrs: { |
michael@0 | 364 | 0: { }, |
michael@0 | 365 | 6: { "text-line-through-style": "solid" } |
michael@0 | 366 | }, |
michael@0 | 367 | children: [ |
michael@0 | 368 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 369 | { role: ROLE_TEXT_LEAF } // HTML:del text |
michael@0 | 370 | ] |
michael@0 | 371 | }; |
michael@0 | 372 | testElm("del_container", obj); |
michael@0 | 373 | |
michael@0 | 374 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 375 | // HTML:details |
michael@0 | 376 | |
michael@0 | 377 | todo(isAccessible("details"), "details element is not accessible"); |
michael@0 | 378 | |
michael@0 | 379 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 380 | // HTML:dfn contained by paragraph |
michael@0 | 381 | |
michael@0 | 382 | obj = { |
michael@0 | 383 | role: ROLE_PARAGRAPH, |
michael@0 | 384 | textAttrs: { |
michael@0 | 385 | 0: { "font-style": "italic" }, |
michael@0 | 386 | 12: { } |
michael@0 | 387 | }, |
michael@0 | 388 | children: [ |
michael@0 | 389 | { role: ROLE_TEXT_LEAF }, // HTML:dfn text |
michael@0 | 390 | { role: ROLE_TEXT_LEAF } // plain text |
michael@0 | 391 | ] |
michael@0 | 392 | }; |
michael@0 | 393 | testElm("dfn_container", obj); |
michael@0 | 394 | |
michael@0 | 395 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 396 | // HTML:dialog |
michael@0 | 397 | |
michael@0 | 398 | todo(isAccessible("dialog"), "dialog element is not accessible"); |
michael@0 | 399 | |
michael@0 | 400 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 401 | // HTML:div |
michael@0 | 402 | |
michael@0 | 403 | obj = { |
michael@0 | 404 | role: ROLE_SECTION, |
michael@0 | 405 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 406 | children: [ |
michael@0 | 407 | { role: ROLE_TEXT_LEAF } // plain text |
michael@0 | 408 | ] |
michael@0 | 409 | }; |
michael@0 | 410 | testElm("div", obj); |
michael@0 | 411 | |
michael@0 | 412 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 413 | // HTML:em in a paragraph |
michael@0 | 414 | |
michael@0 | 415 | obj = { |
michael@0 | 416 | role: ROLE_PARAGRAPH, |
michael@0 | 417 | textAttrs: { |
michael@0 | 418 | 0: { }, |
michael@0 | 419 | 6: { "font-style": "italic" } |
michael@0 | 420 | }, |
michael@0 | 421 | children: [ |
michael@0 | 422 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 423 | { role: ROLE_TEXT_LEAF } // HTML:em text |
michael@0 | 424 | ] |
michael@0 | 425 | }; |
michael@0 | 426 | testElm("em_container", obj); |
michael@0 | 427 | |
michael@0 | 428 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 429 | // HTML:embed (windowless and windowed plugins) |
michael@0 | 430 | |
michael@0 | 431 | if (WIN) { |
michael@0 | 432 | obj = { |
michael@0 | 433 | role: ROLE_EMBEDDED_OBJECT, |
michael@0 | 434 | states: STATE_UNAVAILABLE |
michael@0 | 435 | }; |
michael@0 | 436 | |
michael@0 | 437 | testElm("embed_plugin_windowless", obj); |
michael@0 | 438 | |
michael@0 | 439 | obj = { |
michael@0 | 440 | role: ROLE_EMBEDDED_OBJECT, |
michael@0 | 441 | absentStates: STATE_UNAVAILABLE |
michael@0 | 442 | }; |
michael@0 | 443 | testElm("embed_plugin_windowed", obj); |
michael@0 | 444 | } |
michael@0 | 445 | |
michael@0 | 446 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 447 | // HTML:fieldset and HTML:legend |
michael@0 | 448 | |
michael@0 | 449 | obj = { |
michael@0 | 450 | role: ROLE_GROUPING, |
michael@0 | 451 | relations: { |
michael@0 | 452 | RELATION_LABELLED_BY: "legend" |
michael@0 | 453 | }, |
michael@0 | 454 | children: [ |
michael@0 | 455 | { |
michael@0 | 456 | role: ROLE_LABEL, |
michael@0 | 457 | relations: { |
michael@0 | 458 | RELATION_LABEL_FOR: "fieldset" |
michael@0 | 459 | }, |
michael@0 | 460 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 461 | }, |
michael@0 | 462 | { |
michael@0 | 463 | role: ROLE_ENTRY |
michael@0 | 464 | } |
michael@0 | 465 | ] |
michael@0 | 466 | }; |
michael@0 | 467 | testElm("fieldset", obj); |
michael@0 | 468 | |
michael@0 | 469 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 470 | // HTML:figure and HTML:figcaption |
michael@0 | 471 | |
michael@0 | 472 | obj = { |
michael@0 | 473 | role: ROLE_FIGURE, |
michael@0 | 474 | attributes: { "xml-roles": "figure" }, |
michael@0 | 475 | relations: { |
michael@0 | 476 | RELATION_LABELLED_BY: "figcaption" |
michael@0 | 477 | }, |
michael@0 | 478 | children: [ |
michael@0 | 479 | { role: ROLE_GRAPHIC }, |
michael@0 | 480 | { |
michael@0 | 481 | role: ROLE_CAPTION, |
michael@0 | 482 | relations: { |
michael@0 | 483 | RELATION_LABEL_FOR: "figure" |
michael@0 | 484 | }, |
michael@0 | 485 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 486 | } |
michael@0 | 487 | ] |
michael@0 | 488 | }; |
michael@0 | 489 | testElm("figure", obj); |
michael@0 | 490 | |
michael@0 | 491 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 492 | // HTML:footer |
michael@0 | 493 | |
michael@0 | 494 | obj = { |
michael@0 | 495 | role: ROLE_FOOTER, |
michael@0 | 496 | attributes: { "xml-roles": "contentinfo" }, |
michael@0 | 497 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 498 | }; |
michael@0 | 499 | testElm("footer", obj); |
michael@0 | 500 | |
michael@0 | 501 | obj = { |
michael@0 | 502 | role: ROLE_FOOTER, |
michael@0 | 503 | absentAttributes: { "xml-roles": "contentinfo" }, |
michael@0 | 504 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 505 | }; |
michael@0 | 506 | testElm("footer_in_article", obj); |
michael@0 | 507 | testElm("footer_in_section", obj); |
michael@0 | 508 | |
michael@0 | 509 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 510 | // HTML:form |
michael@0 | 511 | |
michael@0 | 512 | obj = { |
michael@0 | 513 | role: ROLE_FORM |
michael@0 | 514 | }; |
michael@0 | 515 | testElm("form", obj); |
michael@0 | 516 | |
michael@0 | 517 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 518 | // // HTML:frameset, HTML:frame and HTML:iframe |
michael@0 | 519 | |
michael@0 | 520 | obj = { |
michael@0 | 521 | INTERNAL_FRAME: [ { // HTML:iframe |
michael@0 | 522 | DOCUMENT: [ { |
michael@0 | 523 | INTERNAL_FRAME: [ { // HTML:frame |
michael@0 | 524 | DOCUMENT: [ { role: ROLE_TEXT_LEAF} ] |
michael@0 | 525 | } ] |
michael@0 | 526 | } ] |
michael@0 | 527 | } ] |
michael@0 | 528 | }; |
michael@0 | 529 | testElm("frameset_container", obj); |
michael@0 | 530 | |
michael@0 | 531 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 532 | // HTML:h1, HTML:h2, HTML:h3, HTML:h4, HTML:h5, HTML:h6 |
michael@0 | 533 | |
michael@0 | 534 | obj = { |
michael@0 | 535 | role: ROLE_HEADING, |
michael@0 | 536 | attributes: { "level": "1" }, |
michael@0 | 537 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 538 | }; |
michael@0 | 539 | testElm("h1", obj); |
michael@0 | 540 | |
michael@0 | 541 | obj = { |
michael@0 | 542 | role: ROLE_HEADING, |
michael@0 | 543 | attributes: { "level": "2" }, |
michael@0 | 544 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 545 | }; |
michael@0 | 546 | testElm("h2", obj); |
michael@0 | 547 | |
michael@0 | 548 | obj = { |
michael@0 | 549 | role: ROLE_HEADING, |
michael@0 | 550 | attributes: { "level": "3" }, |
michael@0 | 551 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 552 | }; |
michael@0 | 553 | testElm("h3", obj); |
michael@0 | 554 | |
michael@0 | 555 | obj = { |
michael@0 | 556 | role: ROLE_HEADING, |
michael@0 | 557 | attributes: { "level": "4" }, |
michael@0 | 558 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 559 | }; |
michael@0 | 560 | testElm("h4", obj); |
michael@0 | 561 | |
michael@0 | 562 | obj = { |
michael@0 | 563 | role: ROLE_HEADING, |
michael@0 | 564 | attributes: { "level": "5" }, |
michael@0 | 565 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 566 | }; |
michael@0 | 567 | testElm("h5", obj); |
michael@0 | 568 | |
michael@0 | 569 | obj = { |
michael@0 | 570 | role: ROLE_HEADING, |
michael@0 | 571 | attributes: { "level": "6" }, |
michael@0 | 572 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 573 | }; |
michael@0 | 574 | testElm("h6", obj); |
michael@0 | 575 | |
michael@0 | 576 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 577 | // HTML:header |
michael@0 | 578 | |
michael@0 | 579 | obj = { |
michael@0 | 580 | role: ROLE_HEADER, |
michael@0 | 581 | attributes: { "xml-roles": "banner" }, |
michael@0 | 582 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 583 | }; |
michael@0 | 584 | testElm("header", obj); |
michael@0 | 585 | |
michael@0 | 586 | obj = { |
michael@0 | 587 | role: ROLE_HEADER, |
michael@0 | 588 | absentAttributes: { "xml-roles": "banner" }, |
michael@0 | 589 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 590 | }; |
michael@0 | 591 | testElm("header_in_article", obj); |
michael@0 | 592 | testElm("header_in_section", obj); |
michael@0 | 593 | |
michael@0 | 594 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 595 | // HTML:hr |
michael@0 | 596 | |
michael@0 | 597 | obj = { |
michael@0 | 598 | role: ROLE_SEPARATOR, |
michael@0 | 599 | }; |
michael@0 | 600 | testElm("hr", obj); |
michael@0 | 601 | |
michael@0 | 602 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 603 | obj = { // HTML:i contained by paragraph |
michael@0 | 604 | role: ROLE_PARAGRAPH, |
michael@0 | 605 | textAttrs: { |
michael@0 | 606 | 0: { }, |
michael@0 | 607 | 6: { "font-style": "italic" } |
michael@0 | 608 | }, |
michael@0 | 609 | children: [ |
michael@0 | 610 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 611 | { role: ROLE_TEXT_LEAF } // HTML:i text |
michael@0 | 612 | ] |
michael@0 | 613 | } |
michael@0 | 614 | testElm("i_container", obj); |
michael@0 | 615 | |
michael@0 | 616 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 617 | // HTML:img |
michael@0 | 618 | |
michael@0 | 619 | obj = { |
michael@0 | 620 | role: ROLE_GRAPHIC, |
michael@0 | 621 | interfaces: [ nsIAccessibleImage ] |
michael@0 | 622 | }; |
michael@0 | 623 | testElm("img", obj); |
michael@0 | 624 | |
michael@0 | 625 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 626 | // HTML:input@type="button" |
michael@0 | 627 | |
michael@0 | 628 | obj = { |
michael@0 | 629 | role: ROLE_PUSHBUTTON, |
michael@0 | 630 | absentStates: STATE_DEFAULT |
michael@0 | 631 | }; |
michael@0 | 632 | testElm("input_button", obj); |
michael@0 | 633 | |
michael@0 | 634 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 635 | // HTML:input@type="checkbox" |
michael@0 | 636 | |
michael@0 | 637 | obj = { |
michael@0 | 638 | role: ROLE_CHECKBUTTON, |
michael@0 | 639 | states: STATE_CHECKABLE, |
michael@0 | 640 | absentStates: STATE_CHECKED, |
michael@0 | 641 | actions: "check" |
michael@0 | 642 | }; |
michael@0 | 643 | testElm("input_checkbox", obj); |
michael@0 | 644 | |
michael@0 | 645 | obj = { |
michael@0 | 646 | role: ROLE_CHECKBUTTON, |
michael@0 | 647 | states: STATE_CHECKABLE | STATE_CHECKED, |
michael@0 | 648 | actions: "uncheck" |
michael@0 | 649 | }; |
michael@0 | 650 | testElm("input_checkbox_true", obj); |
michael@0 | 651 | |
michael@0 | 652 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 653 | // HTML:input@type="file" |
michael@0 | 654 | |
michael@0 | 655 | obj = { |
michael@0 | 656 | TEXT_CONTAINER: [ |
michael@0 | 657 | { role: ROLE_PUSHBUTTON }, |
michael@0 | 658 | { role: ROLE_LABEL } |
michael@0 | 659 | ] |
michael@0 | 660 | }; |
michael@0 | 661 | testElm("input_file", obj); |
michael@0 | 662 | |
michael@0 | 663 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 664 | // HTML:input@type="image" |
michael@0 | 665 | |
michael@0 | 666 | obj = { |
michael@0 | 667 | role: ROLE_PUSHBUTTON, |
michael@0 | 668 | absentStates: STATE_DEFAULT, |
michael@0 | 669 | actions: "press" |
michael@0 | 670 | }; |
michael@0 | 671 | testElm("input_image", obj); |
michael@0 | 672 | testElm("input_submit", obj); |
michael@0 | 673 | |
michael@0 | 674 | obj = { |
michael@0 | 675 | role: ROLE_PUSHBUTTON, |
michael@0 | 676 | actions: "press", |
michael@0 | 677 | states: STATE_DEFAULT |
michael@0 | 678 | }; |
michael@0 | 679 | testElm("input_image_default", obj); |
michael@0 | 680 | testElm("input_submit_default", obj); |
michael@0 | 681 | |
michael@0 | 682 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 683 | // HTML:input@type="number" and etc |
michael@0 | 684 | |
michael@0 | 685 | obj = { |
michael@0 | 686 | role: ROLE_SPINBUTTON, |
michael@0 | 687 | interfaces: [ nsIAccessibleValue ], |
michael@0 | 688 | children: [ |
michael@0 | 689 | { |
michael@0 | 690 | role: ROLE_ENTRY, |
michael@0 | 691 | extraStates: EXT_STATE_EDITABLE | EXT_STATE_SINGLE_LINE, |
michael@0 | 692 | actions: "activate", |
michael@0 | 693 | interfaces: [ nsIAccessibleText, nsIAccessibleEditableText ], |
michael@0 | 694 | children: [ |
michael@0 | 695 | { role: ROLE_TEXT_LEAF } |
michael@0 | 696 | ] |
michael@0 | 697 | }, |
michael@0 | 698 | { |
michael@0 | 699 | role: ROLE_PUSHBUTTON, |
michael@0 | 700 | actions: "press" |
michael@0 | 701 | }, |
michael@0 | 702 | { |
michael@0 | 703 | role: ROLE_PUSHBUTTON, |
michael@0 | 704 | actions: "press" |
michael@0 | 705 | } |
michael@0 | 706 | ] |
michael@0 | 707 | }; |
michael@0 | 708 | testElm("input_number", obj); |
michael@0 | 709 | |
michael@0 | 710 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 711 | // HTML:input@type="text" and etc |
michael@0 | 712 | |
michael@0 | 713 | obj = { |
michael@0 | 714 | role: ROLE_ENTRY, |
michael@0 | 715 | extraStates: EXT_STATE_EDITABLE | EXT_STATE_SINGLE_LINE, |
michael@0 | 716 | actions: "activate", |
michael@0 | 717 | interfaces: [ nsIAccessibleText, nsIAccessibleEditableText ], |
michael@0 | 718 | children: [ |
michael@0 | 719 | { role: ROLE_TEXT_LEAF } |
michael@0 | 720 | ] |
michael@0 | 721 | }; |
michael@0 | 722 | testElm("input_email", obj); |
michael@0 | 723 | testElm("input_search", obj); |
michael@0 | 724 | testElm("input_tel", obj); |
michael@0 | 725 | testElm("input_text", obj); |
michael@0 | 726 | testElm("input_url", obj); |
michael@0 | 727 | |
michael@0 | 728 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 729 | // HTML:input@type="password" |
michael@0 | 730 | |
michael@0 | 731 | obj = { |
michael@0 | 732 | role: ROLE_PASSWORD_TEXT, |
michael@0 | 733 | states: STATE_PROTECTED, |
michael@0 | 734 | extraStates: EXT_STATE_EDITABLE, |
michael@0 | 735 | actions: "activate", |
michael@0 | 736 | children: [ |
michael@0 | 737 | { |
michael@0 | 738 | role: ROLE_TEXT_LEAF |
michael@0 | 739 | } |
michael@0 | 740 | ] |
michael@0 | 741 | }; |
michael@0 | 742 | testElm("input_password", obj); |
michael@0 | 743 | ok(getAccessible("input_password").firstChild.name != "44", |
michael@0 | 744 | "text leaf for password shouldn't have its real value as its name!"); |
michael@0 | 745 | |
michael@0 | 746 | obj = { |
michael@0 | 747 | role: ROLE_PASSWORD_TEXT, |
michael@0 | 748 | states: STATE_PROTECTED | STATE_READONLY, |
michael@0 | 749 | actions: "activate", |
michael@0 | 750 | children: [ |
michael@0 | 751 | { |
michael@0 | 752 | role: ROLE_TEXT_LEAF |
michael@0 | 753 | } |
michael@0 | 754 | ] |
michael@0 | 755 | }; |
michael@0 | 756 | testElm("input_password_readonly", obj); |
michael@0 | 757 | ok(getAccessible("input_password_readonly").firstChild.name != "44", |
michael@0 | 758 | "text leaf for password shouldn't have its real value as its name!"); |
michael@0 | 759 | |
michael@0 | 760 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 761 | // HTML:input@type="radio" |
michael@0 | 762 | |
michael@0 | 763 | obj = { |
michael@0 | 764 | role: ROLE_RADIOBUTTON, |
michael@0 | 765 | states: STATE_CHECKABLE, |
michael@0 | 766 | absentStates: STATE_CHECKED, |
michael@0 | 767 | actions: "select" |
michael@0 | 768 | }; |
michael@0 | 769 | testElm("input_radio", obj); |
michael@0 | 770 | |
michael@0 | 771 | obj = { |
michael@0 | 772 | role: ROLE_RADIOBUTTON, |
michael@0 | 773 | states: STATE_CHECKABLE | STATE_CHECKED, |
michael@0 | 774 | actions: "select" |
michael@0 | 775 | }; |
michael@0 | 776 | testElm("input_radio_true", obj); |
michael@0 | 777 | |
michael@0 | 778 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 779 | // HTML:input@type="range" |
michael@0 | 780 | |
michael@0 | 781 | obj = { |
michael@0 | 782 | role: ROLE_SLIDER |
michael@0 | 783 | }; |
michael@0 | 784 | testElm("input_range", obj); |
michael@0 | 785 | |
michael@0 | 786 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 787 | // HTML:input@type="reset" |
michael@0 | 788 | |
michael@0 | 789 | obj = { |
michael@0 | 790 | role: ROLE_PUSHBUTTON, |
michael@0 | 791 | actions: "press", |
michael@0 | 792 | absentStates: STATE_DEFAULT |
michael@0 | 793 | }; |
michael@0 | 794 | testElm("input_reset", obj); |
michael@0 | 795 | |
michael@0 | 796 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 797 | // HTML:ins contained by paragraph |
michael@0 | 798 | |
michael@0 | 799 | obj = { |
michael@0 | 800 | role: ROLE_PARAGRAPH, |
michael@0 | 801 | textAttrs: { |
michael@0 | 802 | 0: { }, |
michael@0 | 803 | 6: { "text-underline-style": "solid" } |
michael@0 | 804 | }, |
michael@0 | 805 | children: [ |
michael@0 | 806 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 807 | { role: ROLE_TEXT_LEAF } // HTML:ins text |
michael@0 | 808 | ] |
michael@0 | 809 | }; |
michael@0 | 810 | testElm("ins_container", obj); |
michael@0 | 811 | |
michael@0 | 812 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 813 | // HTML:kbd contained by paragraph |
michael@0 | 814 | |
michael@0 | 815 | obj = { |
michael@0 | 816 | role: ROLE_PARAGRAPH, |
michael@0 | 817 | textAttrs: { |
michael@0 | 818 | 0: { }, |
michael@0 | 819 | 6: { "font-family": kMonospaceFontFamily } |
michael@0 | 820 | }, |
michael@0 | 821 | children: [ |
michael@0 | 822 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 823 | { role: ROLE_TEXT_LEAF } // HTML:kbd text |
michael@0 | 824 | ] |
michael@0 | 825 | }; |
michael@0 | 826 | testElm("kbd_container", obj); |
michael@0 | 827 | |
michael@0 | 828 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 829 | // HTML:keygen |
michael@0 | 830 | |
michael@0 | 831 | obj = { |
michael@0 | 832 | role: ROLE_COMBOBOX, |
michael@0 | 833 | states: STATE_COLLAPSED | STATE_HASPOPUP, |
michael@0 | 834 | extraStates: EXT_STATE_EXPANDABLE, |
michael@0 | 835 | actions: "open", |
michael@0 | 836 | children: [ |
michael@0 | 837 | { COMBOBOX_LIST: [ |
michael@0 | 838 | { role: ROLE_COMBOBOX_OPTION }, // high grade |
michael@0 | 839 | { role: ROLE_COMBOBOX_OPTION } // medium grade |
michael@0 | 840 | ] } |
michael@0 | 841 | ] |
michael@0 | 842 | }; |
michael@0 | 843 | testElm("keygen", obj); |
michael@0 | 844 | |
michael@0 | 845 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 846 | // HTML:label |
michael@0 | 847 | |
michael@0 | 848 | obj = { |
michael@0 | 849 | role: ROLE_LABEL, |
michael@0 | 850 | todo_relations: { |
michael@0 | 851 | RELATION_LABEL_FOR: "label_input" |
michael@0 | 852 | }, |
michael@0 | 853 | children: [ |
michael@0 | 854 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 855 | { |
michael@0 | 856 | role: ROLE_ENTRY, |
michael@0 | 857 | relations: { |
michael@0 | 858 | RELATION_LABELLED_BY: "label" |
michael@0 | 859 | } |
michael@0 | 860 | } |
michael@0 | 861 | ] |
michael@0 | 862 | }; |
michael@0 | 863 | testElm("label", obj); |
michael@0 | 864 | |
michael@0 | 865 | obj = { |
michael@0 | 866 | role: ROLE_LABEL, |
michael@0 | 867 | relations: { |
michael@0 | 868 | RELATION_LABEL_FOR: "label_for_input" |
michael@0 | 869 | } |
michael@0 | 870 | }; |
michael@0 | 871 | testElm("label_for", obj); |
michael@0 | 872 | |
michael@0 | 873 | obj = { |
michael@0 | 874 | role: ROLE_ENTRY, |
michael@0 | 875 | relations: { |
michael@0 | 876 | RELATION_LABELLED_BY: "label_for" |
michael@0 | 877 | } |
michael@0 | 878 | }; |
michael@0 | 879 | testElm("label_for_input", obj); |
michael@0 | 880 | |
michael@0 | 881 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 882 | // HTML:ul, HTML:ol, HTML:li |
michael@0 | 883 | |
michael@0 | 884 | obj = { // ul or ol |
michael@0 | 885 | role: ROLE_LIST, |
michael@0 | 886 | states: STATE_READONLY, |
michael@0 | 887 | children: [ |
michael@0 | 888 | { // li |
michael@0 | 889 | role: ROLE_LISTITEM, |
michael@0 | 890 | states: STATE_READONLY, |
michael@0 | 891 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 892 | } |
michael@0 | 893 | ] |
michael@0 | 894 | }; |
michael@0 | 895 | testElm("ul", obj); |
michael@0 | 896 | testElm("ol", obj); |
michael@0 | 897 | |
michael@0 | 898 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 899 | // HTML:link |
michael@0 | 900 | |
michael@0 | 901 | ok(!isAccessible("link"), "link element is not accessible"); |
michael@0 | 902 | |
michael@0 | 903 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 904 | // HTML:main |
michael@0 | 905 | |
michael@0 | 906 | obj = { |
michael@0 | 907 | todo_role: ROLE_GROUPING, |
michael@0 | 908 | attributes: { "xml-roles": "main" }, |
michael@0 | 909 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 910 | }; |
michael@0 | 911 | testElm("main", obj); |
michael@0 | 912 | |
michael@0 | 913 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 914 | // HTML:map |
michael@0 | 915 | |
michael@0 | 916 | ok(!isAccessible("map_imagemap"), |
michael@0 | 917 | "map element is not accessible if used as an image map"); |
michael@0 | 918 | |
michael@0 | 919 | obj = { |
michael@0 | 920 | role: ROLE_TEXT_CONTAINER |
michael@0 | 921 | }; |
michael@0 | 922 | testElm("map", obj); |
michael@0 | 923 | |
michael@0 | 924 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 925 | // HTML:mark contained by paragraph |
michael@0 | 926 | |
michael@0 | 927 | obj = { |
michael@0 | 928 | role: ROLE_PARAGRAPH, |
michael@0 | 929 | textAttrs: { |
michael@0 | 930 | 0: { }, |
michael@0 | 931 | 6: { "background-color": "rgb(255, 255, 0)" } |
michael@0 | 932 | }, |
michael@0 | 933 | children: [ |
michael@0 | 934 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 935 | { role: ROLE_TEXT_LEAF } // HTML:mark text |
michael@0 | 936 | ] |
michael@0 | 937 | }; |
michael@0 | 938 | testElm("mark_container", obj); |
michael@0 | 939 | |
michael@0 | 940 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 941 | // HTML:math |
michael@0 | 942 | |
michael@0 | 943 | obj = { |
michael@0 | 944 | role: ROLE_EQUATION |
michael@0 | 945 | }; |
michael@0 | 946 | testElm("math", obj); |
michael@0 | 947 | |
michael@0 | 948 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 949 | // HTML:menu |
michael@0 | 950 | |
michael@0 | 951 | obj = { |
michael@0 | 952 | todo_role: ROLE_MENUPOPUP |
michael@0 | 953 | }; |
michael@0 | 954 | testElm("menu", obj); |
michael@0 | 955 | |
michael@0 | 956 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 957 | // HTML:meter |
michael@0 | 958 | |
michael@0 | 959 | todo(isAccessible("meter"), "meter element is not accessible"); |
michael@0 | 960 | |
michael@0 | 961 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 962 | // HTML:nav |
michael@0 | 963 | |
michael@0 | 964 | obj = { |
michael@0 | 965 | role: ROLE_SECTION, |
michael@0 | 966 | attributes: { "xml-roles": "navigation" }, |
michael@0 | 967 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 968 | }; |
michael@0 | 969 | testElm("nav", obj); |
michael@0 | 970 | |
michael@0 | 971 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 972 | // HTML:object (windowless and windowed plugins) and HTML:param |
michael@0 | 973 | |
michael@0 | 974 | if (WIN) { |
michael@0 | 975 | obj = { |
michael@0 | 976 | role: ROLE_EMBEDDED_OBJECT, |
michael@0 | 977 | states: STATE_UNAVAILABLE, |
michael@0 | 978 | children: [ ] // no child for HTML:param |
michael@0 | 979 | }; |
michael@0 | 980 | testElm("object_plugin_windowless", obj); |
michael@0 | 981 | |
michael@0 | 982 | obj = { |
michael@0 | 983 | role: ROLE_EMBEDDED_OBJECT, |
michael@0 | 984 | absentStates: STATE_UNAVAILABLE |
michael@0 | 985 | }; |
michael@0 | 986 | testElm("object_plugin_windowed", obj); |
michael@0 | 987 | } |
michael@0 | 988 | |
michael@0 | 989 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 990 | // HTML:select, HTML:optgroup and HTML:option |
michael@0 | 991 | |
michael@0 | 992 | obj = { // HMTL:select@size > 1 |
michael@0 | 993 | role: ROLE_LISTBOX, |
michael@0 | 994 | states: STATE_FOCUSABLE, |
michael@0 | 995 | absentStates: STATE_MULTISELECTABLE, |
michael@0 | 996 | interfaces: [ nsIAccessibleSelectable ], |
michael@0 | 997 | children: [ |
michael@0 | 998 | { GROUPING: [ // HTML:optgroup |
michael@0 | 999 | { role: ROLE_STATICTEXT }, |
michael@0 | 1000 | { role: ROLE_OPTION }, // HTML:option |
michael@0 | 1001 | { role: ROLE_OPTION } |
michael@0 | 1002 | ] }, |
michael@0 | 1003 | { |
michael@0 | 1004 | role: ROLE_OPTION, |
michael@0 | 1005 | states: STATE_FOCUSABLE, |
michael@0 | 1006 | actions: "select", |
michael@0 | 1007 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 1008 | } |
michael@0 | 1009 | ] |
michael@0 | 1010 | }; |
michael@0 | 1011 | testElm("select_listbox", obj); |
michael@0 | 1012 | |
michael@0 | 1013 | obj = { // HTML:select@multiple |
michael@0 | 1014 | role: ROLE_LISTBOX, |
michael@0 | 1015 | states: STATE_FOCUSABLE | STATE_MULTISELECTABLE, |
michael@0 | 1016 | children: [ |
michael@0 | 1017 | { role: ROLE_OPTION }, |
michael@0 | 1018 | { role: ROLE_OPTION }, |
michael@0 | 1019 | { role: ROLE_OPTION } |
michael@0 | 1020 | ] |
michael@0 | 1021 | }; |
michael@0 | 1022 | testElm("select_listbox_multiselectable", obj); |
michael@0 | 1023 | |
michael@0 | 1024 | obj = { // HTML:select |
michael@0 | 1025 | role: ROLE_COMBOBOX, |
michael@0 | 1026 | states: STATE_FOCUSABLE, |
michael@0 | 1027 | children: [ |
michael@0 | 1028 | { |
michael@0 | 1029 | role: ROLE_COMBOBOX_LIST, |
michael@0 | 1030 | children: [ |
michael@0 | 1031 | { role: ROLE_COMBOBOX_OPTION }, |
michael@0 | 1032 | { role: ROLE_COMBOBOX_OPTION }, |
michael@0 | 1033 | { role: ROLE_COMBOBOX_OPTION } |
michael@0 | 1034 | ] |
michael@0 | 1035 | } |
michael@0 | 1036 | ] |
michael@0 | 1037 | }; |
michael@0 | 1038 | testElm("select_combobox", obj); |
michael@0 | 1039 | |
michael@0 | 1040 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1041 | // HTML:output |
michael@0 | 1042 | |
michael@0 | 1043 | obj = { |
michael@0 | 1044 | role: ROLE_SECTION, |
michael@0 | 1045 | attributes: { "live": "polite" }, |
michael@0 | 1046 | todo_relations: { |
michael@0 | 1047 | RELATION_CONTROLLED_BY: "output_input" |
michael@0 | 1048 | }, |
michael@0 | 1049 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 1050 | }; |
michael@0 | 1051 | testElm("output", obj); |
michael@0 | 1052 | |
michael@0 | 1053 | obj = { |
michael@0 | 1054 | role: ROLE_ENTRY, |
michael@0 | 1055 | relations: { |
michael@0 | 1056 | RELATION_CONTROLLER_FOR: "output" |
michael@0 | 1057 | } |
michael@0 | 1058 | }; |
michael@0 | 1059 | testElm("output_input", obj); |
michael@0 | 1060 | |
michael@0 | 1061 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1062 | // HTML:pre |
michael@0 | 1063 | |
michael@0 | 1064 | obj = { |
michael@0 | 1065 | role: ROLE_PARAGRAPH, |
michael@0 | 1066 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 1067 | }; |
michael@0 | 1068 | testElm("pre", obj); |
michael@0 | 1069 | |
michael@0 | 1070 | /////////////////////////////////////////////////////////////////////////// |
michael@0 | 1071 | // HTML:progress |
michael@0 | 1072 | |
michael@0 | 1073 | obj = { |
michael@0 | 1074 | role: ROLE_PROGRESSBAR, |
michael@0 | 1075 | absentStates: STATE_MIXED, |
michael@0 | 1076 | interfaces: [ nsIAccessibleValue ] |
michael@0 | 1077 | }; |
michael@0 | 1078 | testElm("progress", obj); |
michael@0 | 1079 | |
michael@0 | 1080 | obj = { |
michael@0 | 1081 | role: ROLE_PROGRESSBAR, |
michael@0 | 1082 | states: STATE_MIXED |
michael@0 | 1083 | }; |
michael@0 | 1084 | testElm("progress_indeterminate", obj); |
michael@0 | 1085 | |
michael@0 | 1086 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1087 | // HTML:q |
michael@0 | 1088 | |
michael@0 | 1089 | obj = { |
michael@0 | 1090 | role: ROLE_TEXT_CONTAINER, |
michael@0 | 1091 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ], |
michael@0 | 1092 | children: [ |
michael@0 | 1093 | { role: ROLE_STATICTEXT }, // left quote |
michael@0 | 1094 | { role: ROLE_TEXT_LEAF }, // quoted text |
michael@0 | 1095 | { role: ROLE_STATICTEXT } // right quote |
michael@0 | 1096 | ] |
michael@0 | 1097 | }; |
michael@0 | 1098 | testElm("q", obj); |
michael@0 | 1099 | |
michael@0 | 1100 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1101 | // HTML:ruby |
michael@0 | 1102 | |
michael@0 | 1103 | todo(isAccessible("ruby"), "ruby element is not accessible"); |
michael@0 | 1104 | |
michael@0 | 1105 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1106 | // HTML:s contained by paragraph |
michael@0 | 1107 | |
michael@0 | 1108 | obj = { |
michael@0 | 1109 | role: ROLE_PARAGRAPH, |
michael@0 | 1110 | textAttrs: { |
michael@0 | 1111 | 0: { }, |
michael@0 | 1112 | 6: { "text-line-through-style": "solid" } |
michael@0 | 1113 | }, |
michael@0 | 1114 | children: [ |
michael@0 | 1115 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1116 | { role: ROLE_TEXT_LEAF } // HTML:i text |
michael@0 | 1117 | ] |
michael@0 | 1118 | }; |
michael@0 | 1119 | testElm("s_container", obj); |
michael@0 | 1120 | |
michael@0 | 1121 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1122 | // HTML:samp contained by paragraph |
michael@0 | 1123 | |
michael@0 | 1124 | obj = { |
michael@0 | 1125 | role: ROLE_PARAGRAPH, |
michael@0 | 1126 | children: [ |
michael@0 | 1127 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1128 | { role: ROLE_TEXT_LEAF } // HTML:samp text |
michael@0 | 1129 | ] |
michael@0 | 1130 | }; |
michael@0 | 1131 | testElm("samp_container", obj); |
michael@0 | 1132 | |
michael@0 | 1133 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1134 | // HTML:section |
michael@0 | 1135 | |
michael@0 | 1136 | obj = { |
michael@0 | 1137 | role: ROLE_SECTION, |
michael@0 | 1138 | attributes: { "xml-roles": "region" }, |
michael@0 | 1139 | interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ] |
michael@0 | 1140 | }; |
michael@0 | 1141 | testElm("section", obj); |
michael@0 | 1142 | |
michael@0 | 1143 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1144 | // HTML:small contained by paragraph |
michael@0 | 1145 | |
michael@0 | 1146 | obj = { |
michael@0 | 1147 | role: ROLE_PARAGRAPH, |
michael@0 | 1148 | textAttrs: { |
michael@0 | 1149 | 0: { }, |
michael@0 | 1150 | 6: { "font-size": "10pt" } |
michael@0 | 1151 | }, |
michael@0 | 1152 | children: [ |
michael@0 | 1153 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1154 | { role: ROLE_TEXT_LEAF } // HTML:small text |
michael@0 | 1155 | ] |
michael@0 | 1156 | }; |
michael@0 | 1157 | testElm("small_container", obj); |
michael@0 | 1158 | |
michael@0 | 1159 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1160 | // HTML:source |
michael@0 | 1161 | |
michael@0 | 1162 | ok(!isAccessible("source"), "source element is not accessible"); |
michael@0 | 1163 | |
michael@0 | 1164 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1165 | // HTML:span |
michael@0 | 1166 | |
michael@0 | 1167 | ok(!isAccessible("span"), "span element is not accessible"); |
michael@0 | 1168 | |
michael@0 | 1169 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1170 | // HTML:strong contained by paragraph |
michael@0 | 1171 | |
michael@0 | 1172 | obj = { |
michael@0 | 1173 | role: ROLE_PARAGRAPH, |
michael@0 | 1174 | children: [ |
michael@0 | 1175 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1176 | { role: ROLE_TEXT_LEAF } // HTML:strong text |
michael@0 | 1177 | ] |
michael@0 | 1178 | }; |
michael@0 | 1179 | testElm("strong_container", obj); |
michael@0 | 1180 | |
michael@0 | 1181 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1182 | // HTML:sub contained by paragraph |
michael@0 | 1183 | |
michael@0 | 1184 | obj = { |
michael@0 | 1185 | role: ROLE_PARAGRAPH, |
michael@0 | 1186 | textAttrs: { |
michael@0 | 1187 | 0: { }, |
michael@0 | 1188 | 6: { "text-position": "sub" } |
michael@0 | 1189 | }, |
michael@0 | 1190 | children: [ |
michael@0 | 1191 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1192 | { role: ROLE_TEXT_LEAF } // HTML:sub text |
michael@0 | 1193 | ] |
michael@0 | 1194 | }; |
michael@0 | 1195 | testElm("sub_container", obj); |
michael@0 | 1196 | |
michael@0 | 1197 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1198 | // HTML:sup contained by paragraph |
michael@0 | 1199 | |
michael@0 | 1200 | obj = { |
michael@0 | 1201 | role: ROLE_PARAGRAPH, |
michael@0 | 1202 | textAttrs: { |
michael@0 | 1203 | 0: { }, |
michael@0 | 1204 | 6: { "text-position": "super" } |
michael@0 | 1205 | }, |
michael@0 | 1206 | children: [ |
michael@0 | 1207 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1208 | { role: ROLE_TEXT_LEAF } // HTML:sup text |
michael@0 | 1209 | ] |
michael@0 | 1210 | }; |
michael@0 | 1211 | testElm("sup_container", obj); |
michael@0 | 1212 | |
michael@0 | 1213 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1214 | // HTML:svg |
michael@0 | 1215 | |
michael@0 | 1216 | obj = { |
michael@0 | 1217 | todo_role: ROLE_GRAPHIC |
michael@0 | 1218 | }; |
michael@0 | 1219 | testElm("svg", obj); |
michael@0 | 1220 | |
michael@0 | 1221 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1222 | // HTML:textarea |
michael@0 | 1223 | |
michael@0 | 1224 | obj = { |
michael@0 | 1225 | role: ROLE_ENTRY, |
michael@0 | 1226 | extraStates: EXT_STATE_MULTI_LINE | EXT_STATE_EDITABLE, |
michael@0 | 1227 | actions: "activate", |
michael@0 | 1228 | interfaces: [ nsIAccessibleText, nsIAccessibleEditableText ] |
michael@0 | 1229 | }; |
michael@0 | 1230 | testElm("textarea", obj); |
michael@0 | 1231 | |
michael@0 | 1232 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1233 | // HTML:time |
michael@0 | 1234 | |
michael@0 | 1235 | ok(!isAccessible("time"), "time element is not accessible"); |
michael@0 | 1236 | |
michael@0 | 1237 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1238 | // HTML:u contained by paragraph |
michael@0 | 1239 | |
michael@0 | 1240 | obj = { |
michael@0 | 1241 | role: ROLE_PARAGRAPH, |
michael@0 | 1242 | textAttrs: { |
michael@0 | 1243 | 0: { }, |
michael@0 | 1244 | 6: { "text-underline-style" : "solid" } |
michael@0 | 1245 | }, |
michael@0 | 1246 | children: [ |
michael@0 | 1247 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1248 | { role: ROLE_TEXT_LEAF } // HTML:u text |
michael@0 | 1249 | ] |
michael@0 | 1250 | }; |
michael@0 | 1251 | testElm("u_container", obj); |
michael@0 | 1252 | |
michael@0 | 1253 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1254 | // HTML:var contained by paragraph |
michael@0 | 1255 | |
michael@0 | 1256 | obj = { |
michael@0 | 1257 | role: ROLE_PARAGRAPH, |
michael@0 | 1258 | children: [ |
michael@0 | 1259 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1260 | { role: ROLE_TEXT_LEAF }, // HTML:var text |
michael@0 | 1261 | { role: ROLE_TEXT_LEAF }, // plain text |
michael@0 | 1262 | { role: ROLE_TEXT_LEAF } // HTML:var text |
michael@0 | 1263 | ] |
michael@0 | 1264 | }; |
michael@0 | 1265 | testElm("var_container", obj); |
michael@0 | 1266 | |
michael@0 | 1267 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 1268 | obj = { // HTML:video |
michael@0 | 1269 | role: ROLE_GROUPING |
michael@0 | 1270 | }; |
michael@0 | 1271 | testElm("video", obj); |
michael@0 | 1272 | |
michael@0 | 1273 | SimpleTest.finish(); |
michael@0 | 1274 | } |
michael@0 | 1275 | |
michael@0 | 1276 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 1277 | addA11yLoadEvent(doTest); |
michael@0 | 1278 | setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); |
michael@0 | 1279 | |
michael@0 | 1280 | </script> |
michael@0 | 1281 | </head> |
michael@0 | 1282 | <body> |
michael@0 | 1283 | |
michael@0 | 1284 | <a target="_blank" |
michael@0 | 1285 | title="Implement figure and figcaption accessibility" |
michael@0 | 1286 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=658272"> |
michael@0 | 1287 | Mozilla Bug 658272 |
michael@0 | 1288 | </a><br/> |
michael@0 | 1289 | <p id="display"></p> |
michael@0 | 1290 | <div id="content" style="display: none"></div> |
michael@0 | 1291 | <pre id="test"> |
michael@0 | 1292 | </pre> |
michael@0 | 1293 | |
michael@0 | 1294 | <a id="a_href" href="www.mozilla.com">mozilla site</a> |
michael@0 | 1295 | <a id="a_nohref">anchor</a> |
michael@0 | 1296 | <table> |
michael@0 | 1297 | <tr> |
michael@0 | 1298 | <td id="td_abbr"><abbr title="World Wide Web">WWW</abbr></td> |
michael@0 | 1299 | </tr> |
michael@0 | 1300 | </table> |
michael@0 | 1301 | <address id="address"> |
michael@0 | 1302 | Mozilla Foundation<br> |
michael@0 | 1303 | 1981 Landings Drive<br> |
michael@0 | 1304 | Building K<br> |
michael@0 | 1305 | Mountain View, CA 94043-0801<br> |
michael@0 | 1306 | USA |
michael@0 | 1307 | </address> |
michael@0 | 1308 | |
michael@0 | 1309 | <map name="atoz_map"> |
michael@0 | 1310 | <area id="area_href" |
michael@0 | 1311 | href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b" |
michael@0 | 1312 | coords="17,0,30,14" alt="b" shape="rect"> |
michael@0 | 1313 | <area id="area_nohref" |
michael@0 | 1314 | coords="0,0,13,14" alt="a" shape="rect"> |
michael@0 | 1315 | </map> |
michael@0 | 1316 | <img id="imgmap" width="447" height="15" |
michael@0 | 1317 | usemap="#atoz_map" |
michael@0 | 1318 | src="../letters.gif"> |
michael@0 | 1319 | |
michael@0 | 1320 | <article id="article">A document</article> |
michael@0 | 1321 | <audio id="audio" controls="true"> |
michael@0 | 1322 | <source id="source" src="../bug461281.ogg" type="video/ogg"> |
michael@0 | 1323 | </audio> |
michael@0 | 1324 | |
michael@0 | 1325 | <aside id="aside"> |
michael@0 | 1326 | <p>Some content related to an <article></p> |
michael@0 | 1327 | </aside> |
michael@0 | 1328 | |
michael@0 | 1329 | <p id="b_container">normal<b>bold</b></p> |
michael@0 | 1330 | <p id="bdi_container">User <bdi>إيان</bdi>: 90 points</p> |
michael@0 | 1331 | <p id="bdo_container"><bdo dir="rtl">This text will go right to left.</bdo></p> |
michael@0 | 1332 | |
michael@0 | 1333 | <blockquote id="blockquote" cite="http://developer.mozilla.org"> |
michael@0 | 1334 | <p>This is a quotation taken from the Mozilla Developer Center.</p> |
michael@0 | 1335 | </blockquote> |
michael@0 | 1336 | |
michael@0 | 1337 | <!-- two BRs, one will be eaten --> |
michael@0 | 1338 | <p id="br_container"><br><br></p> |
michael@0 | 1339 | |
michael@0 | 1340 | <button id="button">button</button> |
michael@0 | 1341 | <form> |
michael@0 | 1342 | <button id="button_default" type="submit">button</button> |
michael@0 | 1343 | </form> |
michael@0 | 1344 | |
michael@0 | 1345 | <canvas id="canvas"></canvas> |
michael@0 | 1346 | |
michael@0 | 1347 | <table id="table"> |
michael@0 | 1348 | <caption id="caption">caption</caption> |
michael@0 | 1349 | <thead> |
michael@0 | 1350 | <tr> |
michael@0 | 1351 | <th>col1</th><th>col2</th> |
michael@0 | 1352 | </tr> |
michael@0 | 1353 | </thead> |
michael@0 | 1354 | <tbody> |
michael@0 | 1355 | <tr> |
michael@0 | 1356 | <th>col1</th><td>cell2</td> |
michael@0 | 1357 | </tr> |
michael@0 | 1358 | </tbody> |
michael@0 | 1359 | <tfoot> |
michael@0 | 1360 | <tr> |
michael@0 | 1361 | <td>cell5</td><td>cell6</td> |
michael@0 | 1362 | </tr> |
michael@0 | 1363 | </tfoot> |
michael@0 | 1364 | </table> |
michael@0 | 1365 | |
michael@0 | 1366 | <p id="cite_container">normal<cite>cite</cite></p> |
michael@0 | 1367 | <p id="code_container">normal<code>code</code></p> |
michael@0 | 1368 | |
michael@0 | 1369 | <table id="colNcolgroup_table"> |
michael@0 | 1370 | <colgroup> |
michael@0 | 1371 | <col> |
michael@0 | 1372 | <col span="2"> |
michael@0 | 1373 | </colgroup> |
michael@0 | 1374 | <tr> |
michael@0 | 1375 | <td>Lime</td> |
michael@0 | 1376 | <td>Lemon</td> |
michael@0 | 1377 | <td>Orange</td> |
michael@0 | 1378 | </tr> |
michael@0 | 1379 | </table> |
michael@0 | 1380 | |
michael@0 | 1381 | <p id="data_container"><data value="8">Eight</data></p> |
michael@0 | 1382 | |
michael@0 | 1383 | <datalist id="datalist"> |
michael@0 | 1384 | <summary id="summary">details</summary> |
michael@0 | 1385 | <option>Paris</option> |
michael@0 | 1386 | <option>San Francisco</option> |
michael@0 | 1387 | </datalist> |
michael@0 | 1388 | <input id="autocomplete_datalist" list="datalist"> |
michael@0 | 1389 | |
michael@0 | 1390 | <dl id="dl"> |
michael@0 | 1391 | <dt>item1</dt><dd>description</dd> |
michael@0 | 1392 | </dl> |
michael@0 | 1393 | |
michael@0 | 1394 | <p id="del_container">normal<del>Removed</del></p> |
michael@0 | 1395 | |
michael@0 | 1396 | <details id="details" open="open"> |
michael@0 | 1397 | <summary>Information</summary> |
michael@0 | 1398 | <p>If your browser supports this element, it should allow you to expand and collapse these details.</p> |
michael@0 | 1399 | </details> |
michael@0 | 1400 | |
michael@0 | 1401 | <p id="dfn_container"><dfn id="def-internet">The Internet</dfn> is a global |
michael@0 | 1402 | system of interconnected networks that use the Internet Protocol Suite (TCP/IP) |
michael@0 | 1403 | to serve billions of users worldwide.</p> |
michael@0 | 1404 | |
michael@0 | 1405 | <dialog id="dialog" open="true">This is a dialog</dialog> |
michael@0 | 1406 | |
michael@0 | 1407 | <div id="div">div</div> |
michael@0 | 1408 | |
michael@0 | 1409 | <p id="em_container">normal<em>emphasis</em></p> |
michael@0 | 1410 | |
michael@0 | 1411 | <embed id="embed_plugin_windowless" type="application/x-test" |
michael@0 | 1412 | width="300" height="300"></embed> |
michael@0 | 1413 | <embed id="embed_plugin_windowed" type="application/x-test" wmode="window" |
michael@0 | 1414 | width="300" height="300"></embed> |
michael@0 | 1415 | |
michael@0 | 1416 | <fieldset id="fieldset"> |
michael@0 | 1417 | <legend id="legend">legend</legend> |
michael@0 | 1418 | <input /> |
michael@0 | 1419 | </fieldset> |
michael@0 | 1420 | |
michael@0 | 1421 | <figure id="figure"> |
michael@0 | 1422 | <img src="../moz.png" alt="An awesome picture"> |
michael@0 | 1423 | <figcaption id="figcaption">Caption for the awesome picture</figcaption> |
michael@0 | 1424 | </figure> |
michael@0 | 1425 | |
michael@0 | 1426 | <footer id="footer">Some copyright info</footer> |
michael@0 | 1427 | <article> |
michael@0 | 1428 | <footer id="footer_in_article">Some copyright info</footer> |
michael@0 | 1429 | </article> |
michael@0 | 1430 | <section> |
michael@0 | 1431 | <footer id="footer_in_section">Some copyright info</footer> |
michael@0 | 1432 | </section> |
michael@0 | 1433 | |
michael@0 | 1434 | <form id="form"></form> |
michael@0 | 1435 | |
michael@0 | 1436 | <iframe id="frameset_container" |
michael@0 | 1437 | src="data:text/html,<html><frameset><frame src='data:text/html,hi'></frame></frameset></html>"> |
michael@0 | 1438 | </iframe> |
michael@0 | 1439 | |
michael@0 | 1440 | <h1 id="h1">heading1</h1> |
michael@0 | 1441 | <h2 id="h2">heading2</h2> |
michael@0 | 1442 | <h3 id="h3">heading3</h3> |
michael@0 | 1443 | <h4 id="h4">heading4</h4> |
michael@0 | 1444 | <h5 id="h5">heading5</h5> |
michael@0 | 1445 | <h6 id="h6">heading6</h6> |
michael@0 | 1446 | |
michael@0 | 1447 | <header id="header">A logo</header> |
michael@0 | 1448 | <article> |
michael@0 | 1449 | <header id="header_in_article">Not logo</header> |
michael@0 | 1450 | </article> |
michael@0 | 1451 | <section> |
michael@0 | 1452 | <header id="header_in_section">Not logo</header> |
michael@0 | 1453 | </section> |
michael@0 | 1454 | |
michael@0 | 1455 | <hr id="hr"> |
michael@0 | 1456 | <p id="i_container">normal<i>italic</i></p> |
michael@0 | 1457 | <img id="img" src="../moz.png"> |
michael@0 | 1458 | |
michael@0 | 1459 | <input id="input_button" type="button" value="Button"> |
michael@0 | 1460 | <input id="input_checkbox" type="checkbox"> |
michael@0 | 1461 | <input id="input_checkbox_true" type="checkbox" checked> |
michael@0 | 1462 | <input id="input_file" type="file"> |
michael@0 | 1463 | <input id="input_image" type="image"> |
michael@0 | 1464 | <form> |
michael@0 | 1465 | <input id="input_image_default" type="image"> |
michael@0 | 1466 | </form> |
michael@0 | 1467 | <input id="input_submit" type="submit"> |
michael@0 | 1468 | <form> |
michael@0 | 1469 | <input id="input_submit_default" type="submit"> |
michael@0 | 1470 | </form> |
michael@0 | 1471 | <input id="input_number" type="number" value="44"> |
michael@0 | 1472 | <input id="input_text" type="text" value="hi"> |
michael@0 | 1473 | <input id="input_search" type="search" value="cats"> |
michael@0 | 1474 | <input id="input_email" type="email" value="me@mozilla.com"> |
michael@0 | 1475 | <input id="input_tel" type="tel" value="111.111.1111"> |
michael@0 | 1476 | <input id="input_url" type="url" value="www.mozilla.com"> |
michael@0 | 1477 | <input id="input_password" type="password" value="44"> |
michael@0 | 1478 | <input id="input_password_readonly" type="password" value="44" readonly> |
michael@0 | 1479 | <input id="input_radio" type="radio"> |
michael@0 | 1480 | <input id="input_radio_true" type="radio" checked> |
michael@0 | 1481 | <input id="input_range" type="range"> |
michael@0 | 1482 | <form> |
michael@0 | 1483 | <input id="input_reset" type="reset"> |
michael@0 | 1484 | </form> |
michael@0 | 1485 | |
michael@0 | 1486 | <p id="ins_container">normal<ins>Inserted</ins></p> |
michael@0 | 1487 | <p id="kbd_container">normal<kbd>cmd</kbd></p> |
michael@0 | 1488 | <keygen id="keygen" name="RSA public key" challenge="123456789" keytype="RSA"> |
michael@0 | 1489 | |
michael@0 | 1490 | <label id="label">label<input id="label_input"></label> |
michael@0 | 1491 | <label id="label_for" for="label_for_input">label</label> |
michael@0 | 1492 | <input id="label_for_input"> |
michael@0 | 1493 | |
michael@0 | 1494 | <ul id="ul"> |
michael@0 | 1495 | <li>item1</li> |
michael@0 | 1496 | </ul> |
michael@0 | 1497 | <ol id="ol"> |
michael@0 | 1498 | <li>item1</li> |
michael@0 | 1499 | </ol> |
michael@0 | 1500 | |
michael@0 | 1501 | <main id="main">main</main> |
michael@0 | 1502 | |
michael@0 | 1503 | <map id="map_imagemap" name="atoz_map"> |
michael@0 | 1504 | <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b" |
michael@0 | 1505 | coords="17,0,30,14" alt="b" shape="rect"> |
michael@0 | 1506 | <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a" |
michael@0 | 1507 | coords="0,0,13,14" alt="a" shape="rect"> |
michael@0 | 1508 | </map> |
michael@0 | 1509 | <img id="imgmap" width="447" height="15" |
michael@0 | 1510 | usemap="#atoz_map" |
michael@0 | 1511 | src="../letters.gif"> |
michael@0 | 1512 | |
michael@0 | 1513 | <map id="map" title="Navigation Bar" name="mapgroup"> |
michael@0 | 1514 | <p> |
michael@0 | 1515 | [<a href="#how">Bypass navigation bar</a>] |
michael@0 | 1516 | [<a href="home.html">Home</a>] |
michael@0 | 1517 | </p> |
michael@0 | 1518 | </map> |
michael@0 | 1519 | |
michael@0 | 1520 | <p id="mark_container">normal<mark>highlighted</mark></p> |
michael@0 | 1521 | |
michael@0 | 1522 | <math id="math"> |
michael@0 | 1523 | <mrow> |
michael@0 | 1524 | <mrow> |
michael@0 | 1525 | <msup> |
michael@0 | 1526 | <mi>a</mi> |
michael@0 | 1527 | <mn>2</mn> |
michael@0 | 1528 | </msup> |
michael@0 | 1529 | <mo>+</mo> |
michael@0 | 1530 | <msup> |
michael@0 | 1531 | <mi>b</mi> |
michael@0 | 1532 | <mn>2</mn> |
michael@0 | 1533 | </msup> |
michael@0 | 1534 | </mrow> |
michael@0 | 1535 | <mo>=</mo> |
michael@0 | 1536 | <msup> |
michael@0 | 1537 | <mi>c</mi> |
michael@0 | 1538 | <mn>2</mn> |
michael@0 | 1539 | </msup> |
michael@0 | 1540 | </mrow> |
michael@0 | 1541 | </math> |
michael@0 | 1542 | |
michael@0 | 1543 | <menu id="menu" type="toolbar"> |
michael@0 | 1544 | <li> |
michael@0 | 1545 | <menu label="File"> |
michael@0 | 1546 | <button type="button" onclick="new()">New...</button> |
michael@0 | 1547 | <button type="button" onclick="save()">Save...</button> |
michael@0 | 1548 | </menu> |
michael@0 | 1549 | </li> |
michael@0 | 1550 | <li> |
michael@0 | 1551 | <menu label="Edit"> |
michael@0 | 1552 | <button type="button" onclick="cut()">Cut...</button> |
michael@0 | 1553 | <button type="button" onclick="copy()">Copy...</button> |
michael@0 | 1554 | <button type="button" onclick="paste()">Paste...</button> |
michael@0 | 1555 | </menu> |
michael@0 | 1556 | </li> |
michael@0 | 1557 | </menu> |
michael@0 | 1558 | |
michael@0 | 1559 | <meter id="meter" min="0" max="1000" low="300" high="700" value="200">200 Euro</meter> |
michael@0 | 1560 | |
michael@0 | 1561 | <nav id="nav"> |
michael@0 | 1562 | <ul> |
michael@0 | 1563 | <li><a href="#">Home</a></li> |
michael@0 | 1564 | <li><a href="#">About</a></li> |
michael@0 | 1565 | <li><a href="#">Contact</a></li> |
michael@0 | 1566 | </ul> |
michael@0 | 1567 | </nav> |
michael@0 | 1568 | |
michael@0 | 1569 | <object id="object_plugin_windowless" type="application/x-test" |
michael@0 | 1570 | width="300" height="300"> |
michael@0 | 1571 | <param name="foo" value="bar"> |
michael@0 | 1572 | </object> |
michael@0 | 1573 | <object id="object_plugin_windowed" type="application/x-test" wmode="window" |
michael@0 | 1574 | width="300" height="300"></object> |
michael@0 | 1575 | |
michael@0 | 1576 | <select id="select_listbox" size="4"> |
michael@0 | 1577 | <optgroup label="Colors"> |
michael@0 | 1578 | <option>Red</option> |
michael@0 | 1579 | <option>Blue</option> |
michael@0 | 1580 | </optgroup> |
michael@0 | 1581 | <option>Animal</option> |
michael@0 | 1582 | </select> |
michael@0 | 1583 | |
michael@0 | 1584 | <select id="select_listbox_multiselectable" multiple> |
michael@0 | 1585 | <option>Red</option> |
michael@0 | 1586 | <option>Blue</option> |
michael@0 | 1587 | <option>Green</option> |
michael@0 | 1588 | </select> |
michael@0 | 1589 | |
michael@0 | 1590 | <select id="select_combobox"> |
michael@0 | 1591 | <option>Red</option> |
michael@0 | 1592 | <option>Blue</option> |
michael@0 | 1593 | <option>Green</option> |
michael@0 | 1594 | </select> |
michael@0 | 1595 | |
michael@0 | 1596 | <input id="output_input"> |
michael@0 | 1597 | <output id="output" for="output_input"></output> |
michael@0 | 1598 | |
michael@0 | 1599 | <pre id="pre">pre</pre> |
michael@0 | 1600 | |
michael@0 | 1601 | <progress id="progress" min="0" value="21" max="42"></progress> |
michael@0 | 1602 | <progress id="progress_indeterminate"></progress> |
michael@0 | 1603 | |
michael@0 | 1604 | <q id="q" cite="http://en.wikipedia.org/wiki/Kenny_McCormick#Cultural_impact"> |
michael@0 | 1605 | Oh my God, they killed Kenny! |
michael@0 | 1606 | </q> |
michael@0 | 1607 | |
michael@0 | 1608 | <ruby id="ruby"> |
michael@0 | 1609 | 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> |
michael@0 | 1610 | 字 <rp>(</rp><rt>ji</rt><rp>)</rp> |
michael@0 | 1611 | </ruby> |
michael@0 | 1612 | |
michael@0 | 1613 | <p id="s_container">normal<s>striked</s></p> |
michael@0 | 1614 | <p id="samp_container">normal<samp>sample</samp></p> |
michael@0 | 1615 | <section id="section">section</section> |
michael@0 | 1616 | <p id="small_container">normal<small>small</small></p> |
michael@0 | 1617 | <span id="span"></span> |
michael@0 | 1618 | <p id="strong_container">normal<strong>strong</strong></p> |
michael@0 | 1619 | <p id="sub_container">normal<sub>sub</sub></p> |
michael@0 | 1620 | <p id="sup_container">normal<sup>sup</sup></p> |
michael@0 | 1621 | |
michael@0 | 1622 | <svg id="svg"></svg> |
michael@0 | 1623 | <textarea id="textarea"></textarea> |
michael@0 | 1624 | |
michael@0 | 1625 | <p>The concert took place on <time id="time" datetime="2001-05-15 19:00">May 15</time></p> |
michael@0 | 1626 | <p id="u_container">normal<u>underline</u></p> |
michael@0 | 1627 | <p id="var_container">An equation: <var>x</var> = <var>y</var></p> |
michael@0 | 1628 | |
michael@0 | 1629 | <video id="video" controls="true"> |
michael@0 | 1630 | <source id="source" src="../bug461281.ogg" type="video/ogg"> |
michael@0 | 1631 | </video> |
michael@0 | 1632 | |
michael@0 | 1633 | </video> |
michael@0 | 1634 | </body> |
michael@0 | 1635 | </html> |