├── README.md ├── WAI-ARIA_usage.html ├── aria-usage.css ├── aria-usage.js └── licence.md /README.md: -------------------------------------------------------------------------------- 1 | # WAI-ARIA usage 2 | A bookmarklet to evaluate WAI-ARIA according to the [ARIA in HTML](https://www.w3.org/TR/html-aria/) specification: 3 | * [Document conformance requirements for use of ARIA attributes in HTML](https://www.w3.org/TR/html-aria/#docconformance) 4 | * [Allowed ARIA roles, states, and properties](https://www.w3.org/TR/html-aria/#x4-allowed-aria-roles-states-and-properties) 5 | 6 | [Grab the bookmarklet from this page](https://thepaciellogroup.github.io/WAI-ARIA-Usage/WAI-ARIA_usage.html) to add it to your browser's bookmarks. 7 | -------------------------------------------------------------------------------- /WAI-ARIA_usage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |12 | Add the 13 | WAI-ARIA Usage 14 | bookmarklet to evaluate document conformance requirements for use of ARIA attributes in HTML 15 | and allowed ARIA roles, states, and properties. 16 |
17 |18 | Fork/bug/PR on GitHub. 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /aria-usage.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 1em 2em; 4 | color: #000; 5 | background: #fff; 6 | font-family: helvetica, Verdana, Arial, sans-serif; 7 | font-size: 1em; 8 | } 9 | 10 | h1 { 11 | color: #00427e; 12 | background: #fff; 13 | font-family: Garamond, "Times New Roman", serif; 14 | margin: 0 0 0 -0.5em; 15 | padding: 0.2em; 16 | font-size: 3em; 17 | border-bottom: 6px solid #6c0000; 18 | } 19 | 20 | pre { 21 | color: #000; 22 | background: #D9D9D9; 23 | border: 3px double #6c0000; 24 | padding: 0.5em; 25 | overflow-x: auto; 26 | white-space: pre-wrap; /* css-3 */ 27 | white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 28 | word-wrap: break-word; /* Internet Explorer 5.5+ */ 29 | } 30 | 31 | a { 32 | color: #00427e; 33 | background: #fff; 34 | } 35 | 36 | a:hover, a:focus, a:active { 37 | color: #fff; 38 | background: #00427e; 39 | } 40 | -------------------------------------------------------------------------------- /aria-usage.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var objRoleRules = { 3 | "alert": { 4 | "requiredParent": null, 5 | "requiredChild": null, 6 | "requiredState": null, 7 | "descendantRestrictions": null, 8 | "supported": null, 9 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 10 | "nameable": "yes" 11 | }, 12 | "alertdialog": { 13 | "requiredParent": null, 14 | "requiredChild": null, 15 | "requiredState": null, 16 | "descendantRestrictions": null, 17 | "supported": ["aria-modal"], 18 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 19 | "nameable": "yes" 20 | }, 21 | "application": { 22 | "requiredParent": null, 23 | "requiredChild": null, 24 | "requiredState": null, 25 | "descendantRestrictions": null, 26 | "supported": ["aria-activedescendant", "aria-expanded"], 27 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 28 | "nameable": "yes" 29 | }, 30 | "article": { 31 | "requiredParent": null, 32 | "requiredChild": null, 33 | "requiredState": null, 34 | "descendantRestrictions": ["main"], 35 | "supported": null, 36 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 37 | "nameable": "yes" 38 | }, 39 | "aside": { 40 | "requiredParent": null, 41 | "requiredChild": null, 42 | "requiredState": null, 43 | "descendantRestrictions": null, 44 | "supported": ["aria-pressed"], 45 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 46 | "nameable": "yes" 47 | }, 48 | "banner": { 49 | "requiredParent": null, 50 | "requiredChild": null, 51 | "requiredState": null, 52 | "descendantRestrictions": ["main", "header", "footer"], 53 | "supported": null, 54 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 55 | "nameable": "yes" 56 | }, 57 | "blockquote": { 58 | "requiredParent": null, 59 | "requiredChild": null, 60 | "requiredState": null, 61 | "descendantRestrictions": null, 62 | "supported": null, 63 | "deprecatedAttributes": ["aria-disabled", "aria-haspopup", "aria-invalid"], 64 | "nameable": "yes" 65 | }, 66 | "button": { 67 | "requiredParent": null, 68 | "requiredChild": null, 69 | "requiredState": null, 70 | "descendantRestrictions": ["interactive"], 71 | "supported": ["aria-expanded", "aria-pressed"], 72 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 73 | "nameable": "yes" 74 | }, 75 | "caption": { 76 | "requiredParent": ["figure", "grid", "table", "treegrid"], 77 | "requiredChild": null, 78 | "requiredState": null, 79 | "descendantRestrictions": null, 80 | "supported": null, 81 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 82 | "nameable": "yes" 83 | }, 84 | "cell": { 85 | "requiredParent": "row", 86 | "requiredParentNative": "tr", 87 | "requiredChild": null, 88 | "requiredState": null, 89 | "descendantRestrictions": null, 90 | "supported": ["aria-colspan", "aria-colindex", "aria-rowindex", "aria-rowspan"], 91 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 92 | "nameable": "yes" 93 | }, 94 | "checkbox": { 95 | "requiredParent": null, 96 | "requiredChild": null, 97 | "requiredState": ["aria-checked"], 98 | "descendantRestrictions": ["interactive"], 99 | "supported": ["aria-expanded", "aria-readonly"], 100 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 101 | "nameable": "yes" 102 | }, 103 | "code": { 104 | "requiredParent": null, 105 | "requiredChild": null, 106 | "requiredState": null, 107 | "descendantRestrictions": null, 108 | "supported": null, 109 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 110 | "nameable": "yes" 111 | }, 112 | "columnheader": { 113 | "requiredParent": "row", 114 | "requiredParentNative": "tr", 115 | "requiredChild": null, 116 | "requiredState": null, 117 | "descendantRestrictions": null, 118 | "supported": ["aria-colspan", "aria-colindex", "aria-expanded", "aria-readonly", "aria-required", "aria-rowindex", "aria-rowspan", "aria-selected", "aria-sort"], 119 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 120 | "nameable": "yes" 121 | }, 122 | "combobox": { 123 | "requiredParent": null, 124 | "requiredChild": null, 125 | "requiredState": ["aria-expanded", "aria-controls"], 126 | "descendantRestrictions": null, 127 | "supported": ["aria-activedescendant", "aria-autocomplete", "aria-required", "aria-orientation"], 128 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 129 | "nameable": "yes" 130 | }, 131 | "complementary": { 132 | "requiredParent": null, 133 | "requiredChild": null, 134 | "requiredState": null, 135 | "descendantRestrictions": ["main"], 136 | "supported": null, 137 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 138 | "nameable": "yes" 139 | }, 140 | "contentinfo": { 141 | "requiredParent": null, 142 | "requiredChild": null, 143 | "requiredState": null, 144 | "descendantRestrictions": ["main", "header", "footer"], 145 | "supported": null, 146 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 147 | "nameable": "yes" 148 | }, 149 | "definition": { 150 | "requiredParent": null, 151 | "requiredChild": null, 152 | "requiredState": null, 153 | "descendantRestrictions": ["phrasing"], 154 | "supported": null, 155 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 156 | "nameable": "yes" 157 | }, 158 | "deletion": { 159 | "requiredParent": null, 160 | "requiredChild": null, 161 | "requiredState": null, 162 | "descendantRestrictions": null, 163 | "supported": null, 164 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 165 | "nameable": "yes" 166 | }, 167 | "dialog": { 168 | "requiredParent": null, 169 | "requiredChild": null, 170 | "requiredState": null, 171 | "descendantRestrictions": null, 172 | "supported": ["aria-modal"], 173 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 174 | "nameable": "yes" 175 | }, 176 | "directory": { 177 | "requiredParent": null, 178 | "requiredChild": null, 179 | "requiredState": null, 180 | "descendantRestrictions": null, 181 | "supported": null, 182 | "deprecated": true, 183 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 184 | "nameable": "yes" 185 | }, 186 | "document": { 187 | "requiredParent": null, 188 | "requiredChild": null, 189 | "requiredState": null, 190 | "descendantRestrictions": null, 191 | "supported": null, 192 | "nameable": "yes" 193 | }, 194 | "emphasis": { 195 | "requiredParent": null, 196 | "requiredChild": null, 197 | "requiredState": null, 198 | "descendantRestrictions": null, 199 | "supported": null, 200 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 201 | "nameable": "yes" 202 | }, 203 | "feed": { 204 | "requiredParent": null, 205 | "requiredChild": ["article"], 206 | "requiredState": null, 207 | "descendantRestrictions": null, 208 | "supported": null, 209 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 210 | "nameable": "yes" 211 | }, 212 | "figure": { 213 | "requiredParent": null, 214 | "requiredChild": null, 215 | "requiredState": null, 216 | "descendantRestrictions": null, 217 | "supported": null, 218 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 219 | "nameable": "yes" 220 | }, 221 | "form": { 222 | "requiredParent": null, 223 | "requiredChild": null, 224 | "requiredState": null, 225 | "descendantRestrictions": null, 226 | "supported": null, 227 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 228 | "nameable": "yes" 229 | }, 230 | "generic": { 231 | "requiredParent": null, 232 | "requiredChild": null, 233 | "requiredState": null, 234 | "descendantRestrictions": null, 235 | "supported": null, 236 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 237 | "nameable": "yes" 238 | }, 239 | "grid": { 240 | "requiredParent": null, 241 | "requiredChild": ["row", "rowgroup"], 242 | "requiredChildNative": ["tr"], 243 | "requiredState": null, 244 | "descendantRestrictions": null, 245 | "supported": ["aria-activedescendant", "aria-colcount", "aria-level", "aria-multiselectable", "aria-readonly", "aria-rowcount"], 246 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 247 | "nameable": "yes" 248 | }, 249 | "gridcell": { 250 | "requiredParent": ["row"], 251 | "requiredParentNative": ["tr"], 252 | "requiredChild": null, 253 | "requiredState": null, 254 | "descendantRestrictions": null, 255 | "supported": ["aria-colspan", "aria-colindex", "aria-expanded", "aria-readonly", "aria-required", "aria-rowindex", "aria-rowspan", "aria-selected"], 256 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 257 | "nameable": "yes" 258 | }, 259 | "group": { 260 | "requiredParent": null, 261 | "requiredChild": null, 262 | "requiredState": null, 263 | "descendantRestrictions": null, 264 | "supported": ["aria-activedescendant"], 265 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 266 | "nameable": "yes" 267 | }, 268 | "heading": { 269 | "requiredParent": null, 270 | "requiredChild": null, 271 | "requiredState": ["aria-level"], 272 | "descendantRestrictions": ["article", "aside", "blockquote", "body", "details", "dialog", "fieldset", "figure", "section", "h1", "h2", "h3", "h4", "h5", "h6", "hgroup", "nav", "td"], 273 | "supported": null, 274 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 275 | "nameable": "yes" 276 | }, 277 | "insertion": { 278 | "requiredParent": null, 279 | "requiredChild": null, 280 | "requiredState": null, 281 | "descendantRestrictions": null, 282 | "supported": null, 283 | "deprecatedAttributes": ["aria-errormessage", "aria-haspopup", "aria-invalid"], 284 | "nameable": "yes" 285 | }, 286 | "image": { 287 | "requiredParent": null, 288 | "requiredChild": null, 289 | "requiredState": null, 290 | "descendantRestrictions": null, 291 | "supported": null, 292 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 293 | "nameable": "yes" 294 | }, 295 | "img": { 296 | "requiredParent": null, 297 | "requiredChild": null, 298 | "requiredState": null, 299 | "descendantRestrictions": null, 300 | "supported": null, 301 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 302 | "nameable": "yes" 303 | }, 304 | "link": { 305 | "requiredParent": null, 306 | "requiredChild": null, 307 | "requiredState": null, 308 | "descendantRestrictions": ["interactive"], 309 | "supported": ["aria-expanded"], 310 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 311 | "nameable": "yes" 312 | }, 313 | "list": { 314 | "requiredParent": null, 315 | "requiredChild": ["group", "listitem"], 316 | "requiredState": null, 317 | "descendantRestrictions": null, 318 | "supported": null, 319 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 320 | "nameable": "yes" 321 | }, 322 | "listbox": { 323 | "requiredParent": null, 324 | "requiredChild": ["option"], 325 | "requiredState": null, 326 | "descendantRestrictions": null, 327 | "supported": ["aria-activedescendant", "aria-multiselectable", "aria-required", "aria-orientation"], 328 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 329 | "nameable": "yes" 330 | }, 331 | "listitem": { 332 | "requiredParent": ["group", "list"], 333 | "requiredChild": null, 334 | "requiredState": null, 335 | "descendantRestrictions": null, 336 | "supported": ["aria-level", "aria-posinset", "aria-setsize"], 337 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 338 | "nameable": "yes" 339 | }, 340 | "log": { 341 | "requiredParent": null, 342 | "requiredChild": null, 343 | "requiredState": null, 344 | "descendantRestrictions": null, 345 | "supported": null, 346 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 347 | "nameable": "yes" 348 | }, 349 | "main": { 350 | "requiredParent": null, 351 | "requiredChild": null, 352 | "requiredState": null, 353 | "descendantRestrictions": ["main"], 354 | "supported": null, 355 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 356 | "nameable": "yes" 357 | }, 358 | "marquee": { 359 | "requiredParent": null, 360 | "requiredChild": null, 361 | "requiredState": null, 362 | "descendantRestrictions": null, 363 | "supported": null, 364 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 365 | "nameable": "yes" 366 | }, 367 | "math": { 368 | "requiredParent": null, 369 | "requiredChild": null, 370 | "requiredState": null, 371 | "descendantRestrictions": null, 372 | "supported": null, 373 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 374 | "nameable": "yes" 375 | }, 376 | "meter": { 377 | "requiredParent": null, 378 | "requiredChild": null, 379 | "requiredState": ["aria-valuenow"], 380 | "descendantRestrictions": null, 381 | "supported": null, 382 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 383 | "nameable": "yes" 384 | }, 385 | "menu": { 386 | "requiredParent": null, 387 | "requiredChild": ["group", "menuitem", "menuitemcheckbox", "menuitemradio"], 388 | "requiredState": null, 389 | "descendantRestrictions": null, 390 | "supported": ["aria-activedescendant", "aria-orientation"], 391 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 392 | "nameable": "yes" 393 | }, 394 | "menubar": { 395 | "requiredParent": null, 396 | "requiredChild": ["group", "menuitem", "menuitemcheckbox", "menuitemradio"], 397 | "requiredState": null, 398 | "descendantRestrictions": null, 399 | "supported": ["aria-activedescendant", "aria-orientation"], 400 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 401 | "nameable": "yes" 402 | }, 403 | "menuitem": { 404 | "requiredParent": ["group", "menu", "menubar"], 405 | "requiredChild": null, 406 | "requiredState": null, 407 | "descendantRestrictions": ["interactive"], 408 | "supported": ["aria-expanded", "aria-posinset", "aria-setsize"], 409 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 410 | "nameable": "yes" 411 | }, 412 | "menuitemcheckbox": { 413 | "requiredParent": ["menu", "menubar"], 414 | "requiredChild": null, 415 | "requiredState": ["aria-checked"], 416 | "descendantRestrictions": ["interactive"], 417 | "supported": ["aria-posinset", "aria-setsize"], 418 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 419 | "nameable": "yes" 420 | }, 421 | "menuitemradio": { 422 | "requiredParent": ["group", "menu", "menubar"], 423 | "requiredChild": null, 424 | "requiredState": ["aria-checked"], 425 | "descendantRestrictions": ["interactive"], 426 | "supported": ["aria-posinset", "aria-setsize"], 427 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 428 | "nameable": "yes" 429 | }, 430 | "navigation": { 431 | "requiredParent": null, 432 | "requiredChild": null, 433 | "requiredState": null, 434 | "descendantRestrictions": ["main"], 435 | "supported": null, 436 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 437 | "nameable": "yes" 438 | }, 439 | "none": { 440 | "requiredParent": null, 441 | "requiredChild": null, 442 | "requiredState": null, 443 | "descendantRestrictions": null, 444 | "supported": null, 445 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 446 | "nameable": "no" 447 | }, 448 | "note": { 449 | "requiredParent": null, 450 | "requiredChild": null, 451 | "requiredState": null, 452 | "descendantRestrictions": null, 453 | "supported": null, 454 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 455 | "nameable": "yes" 456 | }, 457 | "option": { 458 | "requiredParent": ["listbox"], 459 | "requiredChild": null, 460 | "requiredState": ["aria-selected"], 461 | "descendantRestrictions": ["interactive"], 462 | "supported": ["aria-checked", "aria-posinset", "aria-selected", "aria-setsize"], 463 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 464 | "nameable": "yes" 465 | }, 466 | "paragraph": { 467 | "requiredParent": null, 468 | "requiredChild": null, 469 | "requiredState": null, 470 | "descendantRestrictions": null, 471 | "supported": null, 472 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 473 | "nameable": "yes" 474 | }, 475 | "presentation": { 476 | "requiredParent": null, 477 | "requiredChild": null, 478 | "requiredState": null, 479 | "descendantRestrictions": null, 480 | "supported": null, 481 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 482 | "nameable": "no" 483 | }, 484 | "progressbar": { 485 | "requiredParent": null, 486 | "requiredChild": null, 487 | "requiredState": null, 488 | "descendantRestrictions": null, 489 | "supported": ["aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext"], 490 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 491 | "nameable": "yes" 492 | }, 493 | "radio": { 494 | "requiredParent": null, 495 | "requiredChild": null, 496 | "requiredState": ["aria-checked"], 497 | "descendantRestrictions": ["interactive"], 498 | "supported": ["aria-posinset", "aria-selected", "aria-setsize"], 499 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 500 | "nameable": "yes" 501 | }, 502 | "radiogroup": { 503 | "requiredParent": null, 504 | "requiredChild": "radio", 505 | "requiredState": null, 506 | "descendantRestrictions": null, 507 | "supported": ["aria-activedescendant", "aria-orientation", "aria-required"], 508 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 509 | "nameable": "yes" 510 | }, 511 | "region": { 512 | "requiredParent": null, 513 | "requiredChild": null, 514 | "requiredState": null, 515 | "descendantRestrictions": null, 516 | "supported": null, 517 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 518 | "nameable": "yes" 519 | }, 520 | "row": { 521 | "requiredParent": ["grid", "rowgroup", "table", "treegrid"], 522 | "requiredParentNative": ["table", "thead", "tbody", "tfoot"], 523 | "requiredChild": ["cell", "columnheader", "gridcell", "rowheader"], 524 | "requiredChildNative": ["td", "th"], 525 | "requiredState": null, 526 | "descendantRestrictions": null, 527 | "supported": ["aria-activedescendant", "aria-colindex", "aria-rowindex", "aria-selected", "aria-expanded", "aria-level","aria-posinset", "aria-setsize"], 528 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 529 | "nameable": "yes" 530 | }, 531 | "rowgroup": { 532 | "requiredParent": ["grid", "table", "treegrid"], 533 | "requiredParentNative": "table", 534 | "requiredChild": ["row"], 535 | "requiredChildNative": "tr", 536 | "requiredState": null, 537 | "descendantRestrictions": null, 538 | "supported": null, 539 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 540 | "nameable": "yes" 541 | }, 542 | "rowheader": { 543 | "requiredParent": ["row"], 544 | "requiredParentNative": ["tr"], 545 | "requiredChild": null, 546 | "requiredState": null, 547 | "descendantRestrictions": null, 548 | "supported": ["aria-colindex", "aria-colspan", "aria-expanded", "aria-readonly", "aria-required", "aria-rowindex", "aria-rowspan", "aria-selected", "aria-expanded"], 549 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 550 | "nameable": "yes" 551 | }, 552 | "scrollbar": { 553 | "requiredParent": null, 554 | "requiredChild": null, 555 | "requiredState": ["aria-controls", "aria-orientation", "aria-valuemax", "aria-valuemin", "aria-valuenow"], 556 | "descendantRestrictions": null, 557 | "supported": ["aria-valuetext"], 558 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 559 | "nameable": "yes" 560 | }, 561 | "search": { 562 | "requiredParent": null, 563 | "requiredChild": null, 564 | "requiredState": null, 565 | "descendantRestrictions": null, 566 | "supported": null, 567 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 568 | "nameable": "yes" 569 | }, 570 | "searchbox": { 571 | "requiredParent": null, 572 | "requiredChild": null, 573 | "requiredState": null, 574 | "descendantRestrictions": ["interactive"], 575 | "supported": ["aria-activedescendant", "aria-autocomplete", "aria-multiline", "aria-placeholder", "aria-readonly", "aria-required"], 576 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 577 | "nameable": "yes" 578 | }, 579 | "separator": { 580 | "requiredParent": null, 581 | "requiredChild": null, 582 | "requiredState": ["aria-valuemax", "aria-valuemin", "aria-valuenow"], 583 | "descendantRestrictions": null, 584 | "supported": ["aria-orientation", "aria-valuetext"], 585 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 586 | "nameable": "yes" 587 | }, 588 | "slider": { 589 | "requiredParent": null, 590 | "requiredChild": null, 591 | "requiredState": ["aria-valuemax", "aria-valuemin", "aria-valuenow"], 592 | "descendantRestrictions": null, 593 | "supported": ["aria-orientation", "aria-valuetext"], 594 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 595 | "nameable": "yes" 596 | }, 597 | "spinbutton": { 598 | "requiredParent": null, 599 | "requiredChild": null, 600 | "requiredState": ["aria-valuemax", "aria-valuemin", "aria-valuenow"], 601 | "descendantRestrictions": null, 602 | "supported": ["aria-readonly", "aria-required", "aria-valuetext", "aria-placeholder"], 603 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 604 | "nameable": "yes" 605 | }, 606 | "status": { 607 | "requiredParent": null, 608 | "requiredChild": null, 609 | "requiredState": null, 610 | "descendantRestrictions": null, 611 | "supported": null, 612 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 613 | "nameable": "yes" 614 | }, 615 | "strong": { 616 | "requiredParent": null, 617 | "requiredChild": null, 618 | "requiredState": null, 619 | "descendantRestrictions": null, 620 | "supported": null, 621 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 622 | "nameable": "yes" 623 | }, 624 | "subscript": { 625 | "requiredParent": null, 626 | "requiredChild": null, 627 | "requiredState": null, 628 | "descendantRestrictions": null, 629 | "supported": null, 630 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 631 | "nameable": "yes" 632 | }, 633 | "superscript": { 634 | "requiredParent": null, 635 | "requiredChild": null, 636 | "requiredState": null, 637 | "descendantRestrictions": null, 638 | "supported": null, 639 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 640 | "nameable": "yes" 641 | }, 642 | "switch": { 643 | "requiredParent": null, 644 | "requiredChild": null, 645 | "requiredState": ["aria-checked"], 646 | "descendantRestrictions": ["interactive"], 647 | "supported": ["aria-expanded", "aria-readonly"], 648 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 649 | "nameable": "yes" 650 | }, 651 | "tab": { 652 | "requiredParent": ["tablist"], 653 | "requiredChild": null, 654 | "requiredState": null, 655 | "descendantRestrictions": null, 656 | "supported": ["aria-expanded", "aria-posinset", "aria-selected", "aria-setsize"], 657 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 658 | "nameable": "yes" 659 | }, 660 | "table": { 661 | "requiredParent": null, 662 | "requiredChild": ["row", "rowgroup"], 663 | "requiredChildNative": ["tr", "thead", "tbody", "tfoot"], 664 | "requiredState": null, 665 | "descendantRestrictions": null, 666 | "supported": ["aria-colcount", "aria-rowcount"], 667 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 668 | "nameable": "yes" 669 | }, 670 | "tablist": { 671 | "requiredParent": null, 672 | "requiredChild": ["tab"], 673 | "requiredState": null, 674 | "descendantRestrictions": null, 675 | "supported": ["aria-activedescendant", "aria-level", "aria-multiselectable", "aria-orientation"], 676 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 677 | "nameable": "yes" 678 | }, 679 | "tabpanel": { 680 | "requiredParent": null, 681 | "requiredChild": null, 682 | "requiredState": null, 683 | "descendantRestrictions": null, 684 | "supported": null, 685 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 686 | "nameable": "yes" 687 | }, 688 | "term": { 689 | "requiredParent": null, 690 | "requiredChild": null, 691 | "requiredState": null, 692 | "descendantRestrictions": ["phrasing"], 693 | "supported": null, 694 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 695 | "nameable": "yes" 696 | }, 697 | "textbox": { 698 | "requiredParent": null, 699 | "requiredChild": null, 700 | "requiredState": null, 701 | "descendantRestrictions": ["interactive"], 702 | "supported": ["aria-activedescendant", "aria-autocomplete", "aria-multiline", "aria-placeholder", "aria-readonly", "aria-required"], 703 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed"], 704 | "nameable": "yes" 705 | }, 706 | "time": { 707 | "requiredParent": null, 708 | "requiredChild": null, 709 | "requiredState": null, 710 | "descendantRestrictions": null, 711 | "supported": null, 712 | "deprecatedAttributes": ["aria-disabled", "aria-errormessage", "aria-haspopup", "aria-invalid"], 713 | "nameable": "yes" 714 | }, 715 | "timer": { 716 | "requiredParent": null, 717 | "requiredChild": null, 718 | "requiredState": null, 719 | "descendantRestrictions": null, 720 | "supported": null, 721 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 722 | "nameable": "yes" 723 | }, 724 | "toolbar": { 725 | "requiredParent": null, 726 | "requiredChild": null, 727 | "requiredState": null, 728 | "descendantRestrictions": null, 729 | "supported": ["aria-activedescendant", "aria-orientation"], 730 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"] 731 | }, 732 | "tooltip": { 733 | "requiredParent": null, 734 | "requiredChild": null, 735 | "requiredState": null, 736 | "descendantRestrictions": null, 737 | "supported": null, 738 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 739 | "nameable": "yes" 740 | }, 741 | "tree": { 742 | "requiredParent": null, 743 | "requiredChild": ["group", "treeitem"], 744 | "requiredState": null, 745 | "descendantRestrictions": null, 746 | "supported": ["aria-activedescendant", "aria-multiselectable", "aria-orientation", "aria-required"], 747 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 748 | "nameable": "yes" 749 | }, 750 | "treegrid": { 751 | "requiredParent": null, 752 | "requiredChild": ["row", "rowgroup"], 753 | "requiredState": null, 754 | "descendantRestrictions": null, 755 | "supported": ["aria-activedescendant", "aria-colcount", "aria-level", "aria-multiselectable", "aria-orientation", "aria-readonly", "aria-required", "aria-rowcount"], 756 | "deprecatedAttributes": ["aria-dropeffect", "aria-grabbed", "aria-haspopup"], 757 | "nameable": "yes" 758 | }, 759 | "treeitem": { 760 | "requiredParent": ["group", "tree"], 761 | "requiredChild": null, 762 | "requiredState": ["aria-selected"], 763 | "descendantRestrictions": null, 764 | "supported": ["aria-checked", "aria-expanded", "aria-level", "aria-posinset", "aria-selected", "aria-setsize"], 765 | "deprecatedAttributes": ["aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-invalid"], 766 | "nameable": "yes" 767 | }, 768 | // DPub roles 769 | "doc-abstract": { 770 | "requiredParent": null, 771 | "requiredChild": null, 772 | "requiredState": null, 773 | "descendantRestrictions": null, 774 | "supported": null, 775 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 776 | "nameable": "yes" 777 | }, 778 | "doc-acknowledgments": { 779 | "requiredParent": null, 780 | "requiredChild": null, 781 | "requiredState": null, 782 | "descendantRestrictions": null, 783 | "supported": null, 784 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 785 | "nameable": "yes" 786 | }, 787 | "doc-afterword": { 788 | "requiredParent": null, 789 | "requiredChild": null, 790 | "requiredState": null, 791 | "descendantRestrictions": null, 792 | "supported": null, 793 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 794 | "nameable": "yes" 795 | }, 796 | "doc-appendix": { 797 | "requiredParent": null, 798 | "requiredChild": null, 799 | "requiredState": null, 800 | "descendantRestrictions": null, 801 | "supported": null, 802 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 803 | "nameable": "yes" 804 | }, 805 | "doc-backlink": { 806 | "requiredParent": null, 807 | "requiredChild": null, 808 | "requiredState": null, 809 | "descendantRestrictions": null, 810 | "supported": null, 811 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 812 | "nameable": "yes" 813 | }, 814 | "doc-biblioentry": { 815 | "requiredParent": "list", 816 | "requiredChild": null, 817 | "requiredState": null, 818 | "descendantRestrictions": null, 819 | "supported": null, 820 | "deprecated": true, 821 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 822 | "nameable": "yes" 823 | }, 824 | "doc-bibliography": { 825 | "requiredParent": null, 826 | "requiredChild": "list", 827 | "requiredState": null, 828 | "descendantRestrictions": null, 829 | "supported": null, 830 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 831 | "nameable": "yes" 832 | }, 833 | "doc-biblioref": { 834 | "requiredParent": null, 835 | "requiredChild": null, 836 | "requiredState": null, 837 | "descendantRestrictions": null, 838 | "supported": null, 839 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 840 | "nameable": "yes" 841 | }, 842 | "doc-chapter": { 843 | "requiredParent": null, 844 | "requiredChild": null, 845 | "requiredState": null, 846 | "descendantRestrictions": null, 847 | "supported": null, 848 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 849 | "nameable": "yes" 850 | }, 851 | "doc-colophon": { 852 | "requiredParent": null, 853 | "requiredChild": null, 854 | "requiredState": null, 855 | "descendantRestrictions": null, 856 | "supported": null, 857 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 858 | "nameable": "yes" 859 | }, 860 | "doc-conclusion": { 861 | "requiredParent": null, 862 | "requiredChild": null, 863 | "requiredState": null, 864 | "descendantRestrictions": null, 865 | "supported": null, 866 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 867 | "nameable": "yes" 868 | }, 869 | "doc-cover": { 870 | "requiredParent": null, 871 | "requiredChild": null, 872 | "requiredState": null, 873 | "descendantRestrictions": null, 874 | "supported": null, 875 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"] 876 | }, 877 | "doc-credit": { 878 | "requiredParent": null, 879 | "requiredChild": null, 880 | "requiredState": null, 881 | "descendantRestrictions": null, 882 | "supported": null, 883 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 884 | "nameable": "yes" 885 | }, 886 | "doc-credits": { 887 | "requiredParent": null, 888 | "requiredChild": null, 889 | "requiredState": null, 890 | "descendantRestrictions": null, 891 | "supported": null, 892 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 893 | "nameable": "yes" 894 | }, 895 | "doc-dedication": { 896 | "requiredParent": null, 897 | "requiredChild": null, 898 | "requiredState": null, 899 | "descendantRestrictions": null, 900 | "supported": null, 901 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 902 | "nameable": "yes" 903 | }, 904 | "doc-endnote": { 905 | "requiredParent": ["list"], 906 | "requiredChild": null, 907 | "requiredState": null, 908 | "descendantRestrictions": null, 909 | "supported": null, 910 | "deprecated": true, 911 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 912 | "nameable": "yes" 913 | }, 914 | "doc-endnotes": { 915 | "requiredParent": null, 916 | "requiredChild": "list", 917 | "requiredState": null, 918 | "descendantRestrictions": null, 919 | "supported": null, 920 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 921 | "nameable": "yes" 922 | }, 923 | "doc-epigraph": { 924 | "requiredParent": null, 925 | "requiredChild": null, 926 | "requiredState": null, 927 | "descendantRestrictions": null, 928 | "supported": null, 929 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 930 | "nameable": "yes" 931 | }, 932 | "doc-epilogue": { 933 | "requiredParent": null, 934 | "requiredChild": null, 935 | "requiredState": null, 936 | "descendantRestrictions": null, 937 | "supported": null, 938 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 939 | "nameable": "yes" 940 | }, 941 | "doc-errata": { 942 | "requiredParent": null, 943 | "requiredChild": null, 944 | "requiredState": null, 945 | "descendantRestrictions": null, 946 | "supported": null, 947 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 948 | "nameable": "yes" 949 | }, 950 | "doc-example": { 951 | "requiredParent": null, 952 | "requiredChild": null, 953 | "requiredState": null, 954 | "descendantRestrictions": null, 955 | "supported": null, 956 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 957 | "nameable": "yes" 958 | }, 959 | "doc-footnote": { 960 | "requiredParent": null, 961 | "requiredChild": null, 962 | "requiredState": null, 963 | "descendantRestrictions": null, 964 | "supported": null, 965 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 966 | "nameable": "yes" 967 | }, 968 | "doc-foreword": { 969 | "requiredParent": null, 970 | "requiredChild": null, 971 | "requiredState": null, 972 | "descendantRestrictions": null, 973 | "supported": null, 974 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 975 | "nameable": "yes" 976 | }, 977 | "doc-glossary": { 978 | "requiredParent": null, 979 | "requiredChild": ["term", "definition"], 980 | "requiredState": null, 981 | "descendantRestrictions": null, 982 | "supported": null, 983 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 984 | "nameable": "yes" 985 | }, 986 | "doc-glossref": { 987 | "requiredParent": null, 988 | "requiredChild": null, 989 | "requiredState": null, 990 | "descendantRestrictions": null, 991 | "supported": null, 992 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 993 | "nameable": "yes" 994 | }, 995 | "doc-index": { 996 | "requiredParent": null, 997 | "requiredChild": null, 998 | "requiredState": null, 999 | "descendantRestrictions": null, 1000 | "supported": null, 1001 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1002 | "nameable": "yes" 1003 | }, 1004 | "doc-introduction": { 1005 | "requiredParent": null, 1006 | "requiredChild": null, 1007 | "requiredState": null, 1008 | "descendantRestrictions": null, 1009 | "supported": null, 1010 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1011 | "nameable": "yes" 1012 | }, 1013 | "doc-noteref": { 1014 | "requiredParent": null, 1015 | "requiredChild": null, 1016 | "requiredState": null, 1017 | "descendantRestrictions": null, 1018 | "supported": null, 1019 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1020 | "nameable": "yes" 1021 | }, 1022 | "doc-notice": { 1023 | "requiredParent": null, 1024 | "requiredChild": null, 1025 | "requiredState": null, 1026 | "descendantRestrictions": null, 1027 | "supported": null, 1028 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1029 | "nameable": "yes" 1030 | }, 1031 | 1032 | "doc-pagebreak": { 1033 | "requiredParent": null, 1034 | "requiredChild": null, 1035 | "requiredState": null, 1036 | "descendantRestrictions": null, 1037 | "supported": null, 1038 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1039 | "nameable": "yes" 1040 | }, 1041 | "doc-pagelist": { 1042 | "requiredParent": null, 1043 | "requiredChild": null, 1044 | "requiredState": null, 1045 | "descendantRestrictions": null, 1046 | "supported": null, 1047 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1048 | "nameable": "yes" 1049 | }, 1050 | "doc-part": { 1051 | "requiredParent": null, 1052 | "requiredChild": null, 1053 | "requiredState": null, 1054 | "descendantRestrictions": null, 1055 | "supported": null, 1056 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1057 | "nameable": "yes" 1058 | }, 1059 | "doc-preface": { 1060 | "requiredParent": null, 1061 | "requiredChild": null, 1062 | "requiredState": null, 1063 | "descendantRestrictions": null, 1064 | "supported": null, 1065 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1066 | "nameable": "yes" 1067 | }, 1068 | "doc-prologue": { 1069 | "requiredParent": null, 1070 | "requiredChild": null, 1071 | "requiredState": null, 1072 | "descendantRestrictions": null, 1073 | "supported": null, 1074 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1075 | "nameable": "yes" 1076 | }, 1077 | 1078 | "doc-pullquote": { 1079 | "requiredParent": null, 1080 | "requiredChild": null, 1081 | "requiredState": null, 1082 | "descendantRestrictions": null, 1083 | "supported": null, 1084 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1085 | "nameable": "yes" 1086 | }, 1087 | "doc-qna": { 1088 | "requiredParent": null, 1089 | "requiredChild": null, 1090 | "requiredState": null, 1091 | "descendantRestrictions": null, 1092 | "supported": null, 1093 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"] 1094 | }, 1095 | "doc-subtitle": { 1096 | "requiredParent": null, 1097 | "requiredChild": null, 1098 | "requiredState": null, 1099 | "descendantRestrictions": null, 1100 | "supported": null, 1101 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1102 | "nameable": "yes" 1103 | }, 1104 | "doc-tip": { 1105 | "requiredParent": null, 1106 | "requiredChild": null, 1107 | "requiredState": null, 1108 | "descendantRestrictions": null, 1109 | "supported": null, 1110 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1111 | "nameable": "yes" 1112 | }, 1113 | "doc-toc": { 1114 | "requiredParent": null, 1115 | "requiredChild": null, 1116 | "requiredState": null, 1117 | "descendantRestrictions": null, 1118 | "supported": null, 1119 | "deprecatedAttributes": ["aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-grabbed", "aria-haspopup", "aria-invalid"], 1120 | "nameable": "yes" 1121 | } 1122 | }; 1123 | 1124 | var objElementRules = { 1125 | "ahref": { 1126 | "nodeName": "a", 1127 | "nativeRole": "link", 1128 | "allowedRoles": ["button", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab", "treeitem", "doc-backlink", "doc-biblioref", "doc-glossref", "doc-noteref"], 1129 | "nameable": "yes" 1130 | }, 1131 | "anohref": { 1132 | "nodeName": "a", 1133 | "nativeRole": null, 1134 | "allowedRoles": "all", 1135 | "nameable": "no" 1136 | }, 1137 | "abbr": { 1138 | "nodeName": "abbr", 1139 | "nativeRole": null, 1140 | "allowedRoles": "all", 1141 | "nameable": "no" 1142 | }, 1143 | "address": { 1144 | "nodeName": "address", 1145 | "nativeRole": null, 1146 | "allowedRoles": "all", 1147 | "nameable": "yes" 1148 | }, 1149 | "area": { 1150 | "nodeName": "area", 1151 | "nativeRole": "link", 1152 | "allowedRoles": [], 1153 | "nameable": "yes" 1154 | }, 1155 | "areanohref": { 1156 | "nodeName": "area", 1157 | "nativeRole": null, 1158 | "allowedRoles": ["button", "link"], 1159 | "nameable": "no" 1160 | }, 1161 | "article": { 1162 | "nodeName": "article", 1163 | "nativeRole": "article", 1164 | "allowedRoles": ["feed", "presentation", "none", "document", "application", "main", "region"], 1165 | "nameable": "yes" 1166 | }, 1167 | "aside": { 1168 | "nodeName": "aside", 1169 | "nativeRole": "complementary", 1170 | "allowedRoles": ["feed", "note", "presentation", "none", "region", "search", "doc-dedication", "doc-example", "doc-footnote", "doc-glossary", "doc-pullquote", "doc-tip"], 1171 | "nameable": "yes" 1172 | }, 1173 | "audio": { 1174 | "nodeName": "audio", 1175 | "nativeRole": null, 1176 | "allowedRoles": ["application"], 1177 | "nameable": "yes" 1178 | }, 1179 | "b": { 1180 | "nodeName": "b", 1181 | "nativeRole": null, 1182 | "allowedRoles": "all", 1183 | "nameable": "no" 1184 | }, 1185 | "base": { 1186 | "nodeName": "base", 1187 | "nativeRole": null, 1188 | "allowedRoles": [], 1189 | "nameable": "no" 1190 | }, 1191 | "bdi": { 1192 | "nodeName": "bdi", 1193 | "nativeRole": null, 1194 | "allowedRoles": "all", 1195 | "nameable": "no" 1196 | }, 1197 | "bdo": { 1198 | "nodeName": "bdo", 1199 | "nativeRole": null, 1200 | "allowedRoles": "all", 1201 | "nameable": "no" 1202 | }, 1203 | "blockquote": { 1204 | "nodeName": "blockquote", 1205 | "nativeRole": null, 1206 | "allowedRoles": "all", 1207 | "nameable": "yes" 1208 | }, 1209 | "body": { 1210 | "nodeName": "body", 1211 | "nativeRole": "document", 1212 | "allowedRoles": [], 1213 | "nameable": "no" 1214 | }, 1215 | "br": { 1216 | "nodeName": "br", 1217 | "nativeRole": null, 1218 | "allowedRoles": ["none", "presentation"], 1219 | "nameable": "no" 1220 | }, 1221 | "button": { 1222 | "nodeName": "button", 1223 | "nativeRole": "button", 1224 | "allowedRoles": ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "separator", "slider", "switch", "tab", "treeitem"], 1225 | "nameable": "yes" 1226 | }, 1227 | "canvas": { 1228 | "nodeName": "canvas", 1229 | "nativeRole": null, 1230 | "allowedRoles": "all", 1231 | "nameable": "yes" 1232 | }, 1233 | "caption": { 1234 | "nodeName": "caption", 1235 | "nativeRole": null, 1236 | "allowedRoles": [], 1237 | "nameable": "no" 1238 | }, 1239 | "cite": { 1240 | "nodeName": "cite", 1241 | "nativeRole": null, 1242 | "allowedRoles": "all", 1243 | "nameable": "no" 1244 | }, 1245 | "code": { 1246 | "nodeName": "code", 1247 | "nativeRole": null, 1248 | "allowedRoles": "all", 1249 | "nameable": "no" 1250 | }, 1251 | "col": { 1252 | "nodeName": "col", 1253 | "nativeRole": null, 1254 | "allowedRoles": [], 1255 | "nameable": "yes" 1256 | }, 1257 | "colgroup": { 1258 | "nodeName": "colgroup", 1259 | "nativeRole": null, 1260 | "allowedRoles": [], 1261 | "nameable": "yes" 1262 | }, 1263 | "data": { 1264 | "nodeName": "data", 1265 | "nativeRole": null, 1266 | "allowedRoles": "all", 1267 | "nameable": "no" 1268 | }, 1269 | "datalist": { 1270 | "nodeName": "datalist", 1271 | "nativeRole": "listbox", 1272 | "allowedRoles": [], 1273 | "nameable": "yes" 1274 | }, 1275 | "dd": { 1276 | "nodeName": "dd", 1277 | "nativeRole": "definition", 1278 | "allowedRoles": [], 1279 | "nameable": "yes" 1280 | }, 1281 | "del": { 1282 | "nodeName": "del", 1283 | "nativeRole": null, 1284 | "allowedRoles": "all", 1285 | "nameable": "no" 1286 | }, 1287 | "details": { 1288 | "nodeName": "details", 1289 | "nativeRole": "group", 1290 | "allowedRoles": [], 1291 | "nameable": "yes" 1292 | }, 1293 | "dfn": { 1294 | "nodeName": "dfn", 1295 | "nativeRole": null, 1296 | "allowedRoles": "all", 1297 | "nameable": "yes" 1298 | }, 1299 | "dialog": { 1300 | "nodeName": "dialog", 1301 | "nativeRole": "dialog", 1302 | "allowedRoles": ["alertdialog"], 1303 | "nameable": "yes" 1304 | }, 1305 | "div": { 1306 | "nodeName": "div", 1307 | "nativeRole": null, 1308 | "allowedRoles": "all", 1309 | "nameable": "no" 1310 | }, 1311 | "dl": { 1312 | "nodeName": "dl", 1313 | "nativeRole": null, 1314 | "allowedRoles": ["group", "list", "presentation", "none"], 1315 | "nameable": "yes" 1316 | }, 1317 | "dt": { 1318 | "nodeName": "dt", 1319 | "nativeRole": "term", 1320 | "allowedRoles": ["listitem"], 1321 | "nameable": "yes" 1322 | }, 1323 | "em": { 1324 | "nodeName": "em", 1325 | "nativeRole": null, 1326 | "allowedRoles": "all", 1327 | "nameable": "no" 1328 | }, 1329 | "embed": { 1330 | "nodeName": "embed", 1331 | "nativeRole": null, 1332 | "allowedRoles": [], 1333 | "nameable": "yes" 1334 | }, 1335 | "figcaption": { 1336 | "nodeName": "figcaption", 1337 | "nativeRole": null, 1338 | "allowedRoles": ["group", "presentation", "none"], 1339 | "nameable": "no" 1340 | }, 1341 | "fieldset": { 1342 | "nodeName": "fieldset", 1343 | "nativeRole": "group", 1344 | "allowedRoles": ["radiogroup", "none", "presentation"], 1345 | "nameable": "yes" 1346 | }, 1347 | "figure": { 1348 | "nodeName": "figure", 1349 | "nativeRole": "figure", 1350 | "allowedRoles": ["doc-example"], 1351 | "nameable": "yes" 1352 | }, 1353 | "figure-nofigcap": { 1354 | "nodeName": "figure", 1355 | "nativeRole": "figure", 1356 | "allowedRoles": "all", 1357 | "nameable": "yes" 1358 | }, 1359 | "footer": { 1360 | "nodeName": "footer", 1361 | "nativeRole": "contentinfo", 1362 | "allowedRoles": ["group", "none", "presentation", "doc-footnote"], 1363 | "nameable": "no" 1364 | }, 1365 | "form": { 1366 | "nodeName": "form", 1367 | "nativeRole": "form", 1368 | "allowedRoles": ["search", "none", "presentation"], 1369 | "nameable": "yes" 1370 | }, 1371 | "h1": { 1372 | "nodeName": "h1", 1373 | "nativeRole": "heading", 1374 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"], 1375 | "nameable": "yes" 1376 | }, 1377 | "h2": { 1378 | "nodeName": "h2", 1379 | "nativeRole": "heading", 1380 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"] 1381 | }, 1382 | "h3": { 1383 | "nodeName": "h3", 1384 | "nativeRole": "heading", 1385 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"], 1386 | "nameable": "yes" 1387 | }, 1388 | "h4": { 1389 | "nodeName": "h4", 1390 | "nativeRole": "heading", 1391 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"], 1392 | "nameable": "yes" 1393 | }, 1394 | "h5": { 1395 | "nodeName": "h5", 1396 | "nativeRole": "heading", 1397 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"], 1398 | "nameable": "yes" 1399 | }, 1400 | "h6": { 1401 | "nodeName": "h6", 1402 | "nativeRole": "heading", 1403 | "allowedRoles": ["tab", "none", "presentation", "doc-subtitle"], 1404 | "nameable": "yes" 1405 | }, 1406 | "head": { 1407 | "nodeName": "head", 1408 | "nativeRole": null, 1409 | "allowedRoles": [], 1410 | "nameable": "yes" 1411 | }, 1412 | "header": { 1413 | "nodeName": "header", 1414 | "nativeRole": "banner", 1415 | "allowedRoles": ["group", "none", "presentation"], 1416 | "nameable": "no" 1417 | }, 1418 | "hgroup": { 1419 | "nodeName": "hgroup", 1420 | "nativeRole": null, 1421 | "allowedRoles": "all", 1422 | "nameable": "yes" 1423 | }, 1424 | "hr": { 1425 | "nodeName": "hr", 1426 | "nativeRole": "separator", 1427 | "allowedRoles": ["none", "presentation", "doc-pagebreak"], 1428 | "nameable": "yes" 1429 | }, 1430 | "html": { 1431 | "nodeName": "html", 1432 | "nativeRole": "document", 1433 | "allowedRoles": [], 1434 | "nameable": "yes" 1435 | }, 1436 | "i": { 1437 | "nodeName": "i", 1438 | "nativeRole": null, 1439 | "allowedRoles": "all", 1440 | "nameable": "no" 1441 | }, 1442 | "iframe": { 1443 | "nodeName": "iframe", 1444 | "nativeRole": null, 1445 | "allowedRoles": ["application", "document", "img", "none", "presentation"], 1446 | "nameable": "yes" 1447 | }, 1448 | "img-noalt": { 1449 | "nodeName": "imgEmptyAlt", 1450 | "nativeRole": "img", 1451 | "allowedRoles": ["none", "presentation"], 1452 | "nameable": "yes" 1453 | }, 1454 | "img-emptyalt": { 1455 | "nodeName": "imgEmptyAlt", 1456 | "nativeRole": "img", 1457 | "allowedRoles": ["none", "presentation"], 1458 | "nameable": "yes" 1459 | }, 1460 | "img": { 1461 | "nodeName": "imgWithAlt", 1462 | "nativeRole": "img", 1463 | "allowedRoles": ["button", "checkbox", "doc-cover", "link", "math", "menuitem", "menuitemcheckbox", "menuitemradio", "meter", "option", "progressbar", "radio", "scrollbar", "separator", "slider", "switch", "tab", "treeitem"], 1464 | "nameable": "yes" 1465 | }, 1466 | "input-button": { 1467 | "nodeName": "input", 1468 | "nativeRole": "button", 1469 | "allowedRoles": ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "separator", "slider", "switch", "tab", "treeitem"], 1470 | "nameable": "yes" 1471 | }, 1472 | "input-checkbox": { 1473 | "nodeName": "input", 1474 | "nativeRole": "checkbox", 1475 | "allowedRoles": ["button", "menuitemcheckbox", "option", "switch"], 1476 | "nameable": "yes" 1477 | }, 1478 | "input-color": { 1479 | "nodeName": "input", 1480 | "nativeRole": null, 1481 | "allowedRoles": [], 1482 | "nameable": "yes" 1483 | }, 1484 | "input-date": { 1485 | "nodeName": "input", 1486 | "nativeRole": "textbox", 1487 | "allowedRoles": [], 1488 | "nameable": "yes" 1489 | }, 1490 | "input-datetime-local": { 1491 | "nodeName": "input", 1492 | "nativeRole": "textbox", 1493 | "allowedRoles": [], 1494 | "nameable": "yes" 1495 | }, 1496 | "input-email": { 1497 | "nodeName": "input", 1498 | "nativeRole": "textbox", 1499 | "allowedRoles": [], 1500 | "nameable": "yes" 1501 | }, 1502 | "input-file": { 1503 | "nodeName": "input", 1504 | "nativeRole": null, 1505 | "allowedRoles": [], 1506 | "nameable": "yes" 1507 | }, 1508 | "input-hidden": { 1509 | "nodeName": "input", 1510 | "nativeRole": null, 1511 | "allowedRoles": [], 1512 | "nameable": "yes" 1513 | }, 1514 | "input-image": { 1515 | "nodeName": "input", 1516 | "nativeRole": "button", 1517 | "allowedRoles": ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "separator", "slider", "switch", "tab", "treeitem"], 1518 | "nameable": "yes" 1519 | }, 1520 | "input-month": { 1521 | "nodeName": "input", 1522 | "nativeRole": "textbox", 1523 | "allowedRoles": [], 1524 | "nameable": "yes" 1525 | }, 1526 | "input-number": { 1527 | "nodeName": "input", 1528 | "nativeRole": "spinbutton", 1529 | "allowedRoles": [], 1530 | "nameable": "yes" 1531 | }, 1532 | "input-password": { 1533 | "nodeName": "input", 1534 | "nativeRole": null, 1535 | "allowedRoles": [], 1536 | "nameable": "yes" 1537 | }, 1538 | "input-radio": { 1539 | "nodeName": "input", 1540 | "nativeRole": "radio", 1541 | "allowedRoles": ["menuitemradio"], 1542 | "nameable": "yes" 1543 | }, 1544 | "input-range": { 1545 | "nodeName": "input", 1546 | "nativeRole": "slider", 1547 | "allowedRoles": [], 1548 | "nameable": "yes" 1549 | }, 1550 | "input-reset": { 1551 | "nodeName": "input", 1552 | "nativeRole": "button", 1553 | "allowedRoles": ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "separator", "slider", "switch", "tab", "treeitem"], 1554 | "nameable": "yes" 1555 | }, 1556 | "input-search": { 1557 | "nodeName": "input", 1558 | "nativeRole": "searchbox", 1559 | "allowedRoles": [], 1560 | "nameable": "yes" 1561 | }, 1562 | "input-submit": { 1563 | "nodeName": "input", 1564 | "nativeRole": "button", 1565 | "allowedRoles": ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "separator", "slider", "switch", "tab", "treeitem"], 1566 | "nameable": "yes" 1567 | }, 1568 | "input-tel": { 1569 | "nodeName": "input", 1570 | "nativeRole": "textbox", 1571 | "allowedRoles": [], 1572 | "nameable": "yes" 1573 | }, 1574 | "input-text": { 1575 | "nodeName": "input", 1576 | "nativeRole": "textbox", 1577 | "allowedRoles": ["combobox", "searchbox", "spinbutton"], 1578 | "nameable": "yes" 1579 | }, 1580 | "input-time": { 1581 | "nodeName": "input", 1582 | "nativeRole": "textbox", 1583 | "allowedRoles": [], 1584 | "nameable": "yes" 1585 | }, 1586 | "input-url": { 1587 | "nodeName": "input", 1588 | "nativeRole": "textbox", 1589 | "allowedRoles": [], 1590 | "nameable": "yes" 1591 | }, 1592 | "input-week": { 1593 | "nodeName": "input", 1594 | "nativeRole": "textbox", 1595 | "allowedRoles": [], 1596 | "nameable": "yes" 1597 | }, 1598 | "ins": { 1599 | "nodeName": "ins", 1600 | "nativeRole": null, 1601 | "allowedRoles": "all", 1602 | "nameable": "no" 1603 | }, 1604 | "kbd": { 1605 | "nodeName": "kbd", 1606 | "nativeRole": null, 1607 | "allowedRoles": "all", 1608 | "nameable": "no" 1609 | }, 1610 | "label": { 1611 | "nodeName": "label", 1612 | "nativeRole": null, 1613 | "allowedRoles": [], 1614 | "nameable": "no" 1615 | }, 1616 | "legend": { 1617 | "nodeName": "legend", 1618 | "nativeRole": null, 1619 | "allowedRoles": [], 1620 | "nameable": "no" 1621 | }, 1622 | "li": { 1623 | "nodeName": "li", 1624 | "nativeRole": "listitem", 1625 | "allowedRoles": ["menuitem", "menuitemcheckbox", "menuitemradio", "option", "none", "presentation", "radio", "separator", "tab", "treeitem", "doc-biblioentry", "doc-endnote"], 1626 | "nameable": "yes" 1627 | }, 1628 | "link": { 1629 | "nodeName": "link", 1630 | "nativeRole": "link", 1631 | "allowedRoles": [], 1632 | "nameable": "yes" 1633 | }, 1634 | "main": { 1635 | "nodeName": "main", 1636 | "nativeRole": "main", 1637 | "allowedRoles": [], 1638 | "nameable": "yes" 1639 | }, 1640 | "map": { 1641 | "nodeName": "map", 1642 | "nativeRole": null, 1643 | "allowedRoles": [], 1644 | "nameable": "yes" 1645 | }, 1646 | "mark": { 1647 | "nodeName": "mark", 1648 | "nativeRole": null, 1649 | "allowedRoles": "all", 1650 | "nameable": "no" 1651 | }, 1652 | "math": { 1653 | "nodeName": "math", 1654 | "nativeRole": "math", 1655 | "allowedRoles": [], 1656 | "nameable": "yes" 1657 | }, 1658 | "menu": { 1659 | "nodeName": "menu", 1660 | "nativeRole": "list", 1661 | "allowedRoles": [ "directory", "group", "listbox", "menu", "menubar", "radiogroup", "tablist", "toolbar", "tree", "presentation", "none"], 1662 | "nameable": "yes" 1663 | }, 1664 | "meta": { 1665 | "nodeName": "meta", 1666 | "nativeRole": null, 1667 | "allowedRoles": [], 1668 | "nameable": "yes" 1669 | }, 1670 | "meter": { 1671 | "nodeName": "meter", 1672 | "nativeRole": null, 1673 | "allowedRoles": [], 1674 | "nameable": "yes" 1675 | }, 1676 | "nav": { 1677 | "nodeName": "nav", 1678 | "nativeRole": "navigation", 1679 | "allowedRoles": ["menu", "menubar", "none", "presentation", "tablist", "doc-index", "doc-pagelist", "doc-toc"], 1680 | "nameable": "yes" 1681 | }, 1682 | "noscript": { 1683 | "nodeName": "noscript", 1684 | "nativeRole": null, 1685 | "allowedRoles": [], 1686 | "nameable": "yes" 1687 | }, 1688 | "object": { 1689 | "nodeName": "object", 1690 | "nativeRole": null, 1691 | "allowedRoles": [], 1692 | "nameable": "yes" 1693 | }, 1694 | "ol": { 1695 | "nodeName": "ol", 1696 | "nativeRole": "list", 1697 | "allowedRoles": ["directory", "group", "listbox", "menu", "menubar", "none", "presentation", "radiogroup", "tablist", "toolbar", "tree"], 1698 | "nameable": "yes" 1699 | }, 1700 | "optgroup": { 1701 | "nodeName": "optgroup", 1702 | "nativeRole": "group", 1703 | "allowedRoles": [], 1704 | "nameable": "yes" 1705 | }, 1706 | "option": { 1707 | "nodeName": "option", 1708 | "nativeRole": "option", 1709 | "allowedRoles": [], 1710 | "nameable": "yes" 1711 | }, 1712 | "output": { 1713 | "nodeName": "output", 1714 | "nativeRole": "status", 1715 | "allowedRoles": "all", 1716 | "nameable": "yes" 1717 | }, 1718 | "p": { 1719 | "nodeName": "p", 1720 | "nativeRole": null, 1721 | "allowedRoles": "all", 1722 | "nameable": "no" 1723 | }, 1724 | "param": { 1725 | "nodeName": "param", 1726 | "nativeRole": null, 1727 | "allowedRoles": [], 1728 | "nameable": "yes" 1729 | }, 1730 | "picture": { 1731 | "nodeName": "picture", 1732 | "nativeRole": null, 1733 | "allowedRoles": [], 1734 | "nameable": "yes" 1735 | }, 1736 | "pre": { 1737 | "nodeName": "pre", 1738 | "nativeRole": null, 1739 | "allowedRoles": "all", 1740 | "nameable": "no" 1741 | }, 1742 | "progress": { 1743 | "nodeName": "progress", 1744 | "nativeRole": "progressbar", 1745 | "allowedRoles": [], 1746 | "nameable": "yes" 1747 | }, 1748 | "q": { 1749 | "nodeName": "q", 1750 | "nativeRole": null, 1751 | "allowedRoles": "all", 1752 | "nameable": "no" 1753 | }, 1754 | "rp": { 1755 | "nodeName": "rp", 1756 | "nativeRole": null, 1757 | "allowedRoles": "all", 1758 | "nameable": "yes" 1759 | }, 1760 | "rt": { 1761 | "nodeName": "rt", 1762 | "nativeRole": null, 1763 | "allowedRoles": "all", 1764 | "nameable": "no" 1765 | }, 1766 | "ruby": { 1767 | "nodeName": "ruby", 1768 | "nativeRole": null, 1769 | "allowedRoles": "all", 1770 | "nameable": "yes" 1771 | }, 1772 | "s": { 1773 | "nodeName": "s", 1774 | "nativeRole": "deletion", 1775 | "allowedRoles": "all", 1776 | "nameable": "no" 1777 | }, 1778 | "samp": { 1779 | "nodeName": "samp", 1780 | "nativeRole": null, 1781 | "allowedRoles": "all", 1782 | "nameable": "no" 1783 | }, 1784 | "script": { 1785 | "nodeName": "script", 1786 | "nativeRole": null, 1787 | "allowedRoles": [], 1788 | "nameable": "yes" 1789 | }, 1790 | "search": { 1791 | "nodeName": "search", 1792 | "nativeRole": "search", 1793 | "allowedRoles": ["form", "group", "none", "presentation", "region", "search"], 1794 | "nameable": "yes" 1795 | }, 1796 | "section": { 1797 | "nodeName": "section", 1798 | "nativeRole": "region", 1799 | "allowedRoles": ["alert", "alertdialog", "application", "banner", "complementary", "contentinfo", "dialog", "document", "feed", "group", "log", "main", "marquee", "navigation", "none", "note", "presentation", "search", "status", "tabpanel", "doc-abstract", "doc-acknowledgments", "doc-afterword", "doc-appendix", "doc-bibliography", "doc-chapter", "doc-colophon", "doc-conclusion", "doc-credit", "doc-credits", "doc-dedication", "doc-endnotes", "doc-epigraph", "doc-epilogue", "doc-errata", "doc-example", "doc-foreword", "doc-glossary", "doc-index", "doc-introduction", "doc-notice", "doc-pagelist", "doc-part", "doc-preface", "doc-prologue", "doc-pullquote", "doc-qna", "doc-toc"], 1800 | "nameable": "yes" 1801 | }, 1802 | "select": { 1803 | "nodeName": "select", 1804 | "nativeRole": "combobox", 1805 | "allowedRoles": ["menu"], 1806 | "nameable": "yes" 1807 | }, 1808 | "select-nomenu": { 1809 | "nodeName": "select", 1810 | "nativeRole": "combobox", 1811 | "allowedRoles": [], 1812 | "nameable": "yes" 1813 | }, 1814 | "select-2": { 1815 | "nodeName": "select", 1816 | "nativeRole": "listbox", 1817 | "allowedRoles": [], 1818 | "nameable": "yes" 1819 | }, 1820 | "slot": { 1821 | "nodeName": "slot", 1822 | "nativeRole": null, 1823 | "allowedRoles": [], 1824 | "nameable": "yes" 1825 | }, 1826 | "small": { 1827 | "nodeName": "small", 1828 | "nativeRole": null, 1829 | "allowedRoles": "all", 1830 | "nameable": "no" 1831 | }, 1832 | "source": { 1833 | "nodeName": "source", 1834 | "nativeRole": null, 1835 | "allowedRoles": [], 1836 | "nameable": "yes" 1837 | }, 1838 | "span": { 1839 | "nodeName": "span", 1840 | "nativeRole": null, 1841 | "allowedRoles": "all", 1842 | "nameable": "no" 1843 | }, 1844 | "strong": { 1845 | "nodeName": "strong", 1846 | "nativeRole": null, 1847 | "allowedRoles": "all", 1848 | "nameable": "no" 1849 | }, 1850 | "style": { 1851 | "nodeName": "style", 1852 | "nativeRole": null, 1853 | "allowedRoles": [], 1854 | "nameable": "yes" 1855 | }, 1856 | "svg": { 1857 | "nodeName": "svg", 1858 | "nativeRole": null, 1859 | "allowedRoles": "all", 1860 | "nameable": "yes" 1861 | }, 1862 | "sub": { 1863 | "nodeName": "sub", 1864 | "nativeRole": null, 1865 | "allowedRoles": "all", 1866 | "nameable": "no" 1867 | }, 1868 | "sup": { 1869 | "nodeName": "sup", 1870 | "nativeRole": null, 1871 | "allowedRoles": "all", 1872 | "nameable": "yes" 1873 | }, 1874 | "summary": { 1875 | "nodeName": "summary", 1876 | "nativeRole": null, 1877 | "allowedRoles": [], 1878 | "nameable": "yes" 1879 | }, 1880 | "table": { 1881 | "nodeName": "table", 1882 | "nativeRole": "table", 1883 | "allowedRoles": "all", 1884 | "nameable": "yes" 1885 | }, 1886 | "template": { 1887 | "nodeName": "template", 1888 | "nativeRole": null, 1889 | "allowedRoles": [], 1890 | "nameable": "yes" 1891 | }, 1892 | "textarea": { 1893 | "nodeName": "textarea", 1894 | "nativeRole": "textbox", 1895 | "allowedRoles": [], 1896 | "nameable": "yes" 1897 | }, 1898 | "tbody": { 1899 | "nodeName": "tbody", 1900 | "nativeRole": "rowgroup", 1901 | "allowedRoles": "all", 1902 | "nameable": "yes" 1903 | }, 1904 | "tfoot": { 1905 | "nodeName": "tfoot", 1906 | "nativeRole": "rowgroup", 1907 | "allowedRoles": "all", 1908 | "nameable": "yes" 1909 | }, 1910 | "thead": { 1911 | "nodeName": "thead", 1912 | "nativeRole": "rowgroup", 1913 | "allowedRoles": "all", 1914 | "nameable": "yes" 1915 | }, 1916 | "title": { 1917 | "nodeName": "title", 1918 | "nativeRole": null, 1919 | "allowedRoles": [], 1920 | "nameable": "yes" 1921 | }, 1922 | "td": { 1923 | "nodeName": "td", 1924 | "nativeRole": "cell", 1925 | "allowedRoles": "all", 1926 | "nameable": "yes" 1927 | }, 1928 | "th": { 1929 | "nodeName": "th", 1930 | "nativeRole": "columnheader", 1931 | "allowedRoles": "all", 1932 | "nameable": "yes" 1933 | }, 1934 | "time": { 1935 | "nodeName": "time", 1936 | "nativeRole": null, 1937 | "allowedRoles": "all", 1938 | "nameable": "no" 1939 | }, 1940 | "tr": { 1941 | "nodeName": "tr", 1942 | "nativeRole": "row", 1943 | "allowedRoles": "all", 1944 | "nameable": "yes" 1945 | }, 1946 | "track": { 1947 | "nodeName": "track", 1948 | "nativeRole": null, 1949 | "allowedRoles": [], 1950 | "nameable": "yes" 1951 | }, 1952 | "u": { 1953 | "nodeName": "u", 1954 | "nativeRole": null, 1955 | "allowedRoles": "all", 1956 | "nameable": "no" 1957 | }, 1958 | "ul": { 1959 | "nodeName": "ul", 1960 | "nativeRole": "list", 1961 | "allowedRoles": ["directory", "group", "listbox", "menu", "menubar", "radiogroup", "tablist", "toolbar", "tree", "presentation", "none"], 1962 | "nameable": "yes" 1963 | }, 1964 | "var": { 1965 | "nodeName": "var", 1966 | "nativeRole": null, 1967 | "allowedRoles": "all", 1968 | "nameable": "no" 1969 | }, 1970 | "video": { 1971 | "nodeName": "video", 1972 | "nativeRole": null, 1973 | "allowedRoles": ["application"], 1974 | "nameable": "yes" 1975 | }, 1976 | "wbr": { 1977 | "nodeName": "wbr", 1978 | "nativeRole": null, 1979 | "allowedRoles": ["none", "presentation"], 1980 | "nameable": "yes" 1981 | }, 1982 | // Common SVG elements 1983 | "circle": { 1984 | "nodeName": "circle", 1985 | "nativeRole": null, 1986 | "allowedRoles": ["none", "presentation"], 1987 | "nameable": "yes" 1988 | }, 1989 | "defs": { 1990 | "nodeName": "defs", 1991 | "nativeRole": null, 1992 | "allowedRoles": ["none", "presentation"], 1993 | "nameable": "yes" 1994 | }, 1995 | "ellipse": { 1996 | "nodeName": "ellipse", 1997 | "nativeRole": null, 1998 | "allowedRoles": ["none", "presentation"], 1999 | "nameable": "yes" 2000 | }, 2001 | "g": { 2002 | "nodeName": "g", 2003 | "nativeRole": null, 2004 | "allowedRoles": ["none", "presentation"], 2005 | "nameable": "yes" 2006 | }, 2007 | "line": { 2008 | "nodeName": "line", 2009 | "nativeRole": null, 2010 | "allowedRoles": ["none", "presentation"], 2011 | "nameable": "yes" 2012 | }, 2013 | "path": { 2014 | "nodeName": "path", 2015 | "nativeRole": null, 2016 | "allowedRoles": ["none", "presentation"], 2017 | "nameable": "yes" 2018 | }, 2019 | "polygon": { 2020 | "nodeName": "polygon", 2021 | "nativeRole": null, 2022 | "allowedRoles": ["none", "presentation"], 2023 | "nameable": "yes" 2024 | }, 2025 | "polyline": { 2026 | "nodeName": "polyline", 2027 | "nativeRole": null, 2028 | "allowedRoles": ["none", "presentation"], 2029 | "nameable": "yes" 2030 | }, 2031 | "rect": { 2032 | "nodeName": "rect", 2033 | "nativeRole": null, 2034 | "allowedRoles": ["none", "presentation"], 2035 | "nameable": "yes" 2036 | }, 2037 | "text": { 2038 | "nodeName": "text", 2039 | "nativeRole": null, 2040 | "allowedRoles": ["none", "presentation"], 2041 | "nameable": "yes" 2042 | } 2043 | }; 2044 | 2045 | // Token for deprecated roles are not included, as a warning is provided for them 2046 | var objTokens = { 2047 | "aria-atomic": { 2048 | "tokenlist": ["false", "true"] 2049 | }, 2050 | "aria-autocomplete": { 2051 | "tokenlist": ["inline", "list", "both"] 2052 | }, 2053 | "aria-busy": { 2054 | "tokenlist": ["false", "true"] 2055 | }, 2056 | "aria-checked": { 2057 | "tokenlist": ["false", "true", "mixed"] 2058 | }, 2059 | "aria-current": { 2060 | "tokenlist": ["page", "step", "location", "date", "time", "true", "false"] 2061 | }, 2062 | "aria-disabled": { 2063 | "tokenlist": ["false", "true"] 2064 | }, 2065 | "aria-expanded": { 2066 | "tokenlist": ["false", "true"] 2067 | }, 2068 | "aria-haspopup": { 2069 | "tokenlist": ["true", "false", "menu", "listbox", "tree", "grid", "dialog"] 2070 | }, 2071 | "aria-hidden": { 2072 | "tokenlist": ["false", "true"] 2073 | }, 2074 | "aria-invalid": { 2075 | "tokenlist": ["grammar", "false", "spelling", "true"] 2076 | }, 2077 | "aria-live": { 2078 | "tokenlist": ["assertive", "off", "polite"] 2079 | }, 2080 | "aria-modal": { 2081 | "tokenlist": ["false", "true"] 2082 | }, 2083 | "aria-multiline": { 2084 | "tokenlist": ["false", "true"] 2085 | }, 2086 | "aria-multiselectable": { 2087 | "tokenlist": ["false", "true"] 2088 | }, 2089 | "aria-orientation": { 2090 | "tokenlist": ["horizontal", "vertical"] 2091 | }, 2092 | "aria-pressed": { 2093 | "tokenlist": ["false", "true", "mixed"] 2094 | }, 2095 | "aria-readonly": { 2096 | "tokenlist": ["false", "true"] 2097 | }, 2098 | "aria-relevant": { 2099 | "tokenlist": ["additions", "additions text", "all", "removals", "text"] 2100 | }, 2101 | "aria-required": { 2102 | "tokenlist": ["false", "true"] 2103 | }, 2104 | "aria-selected": { 2105 | "tokenlist": ["false", "true"] 2106 | } 2107 | }; 2108 | 2109 | 2110 | // 1 = must be 0 or higher; 2111 | // 2 = must be 1 or higher; 2112 | // 3 = must be 1 or higher, or -1; 2113 | // 4 = between 1 and 6 on a heading 2114 | var objIntegers = { 2115 | "aria-colcount": { 2116 | "type": 3 2117 | }, 2118 | "aria-colindex": { 2119 | "type": 2 2120 | }, 2121 | "aria-colspan": { 2122 | "type": 2 2123 | }, 2124 | "aria-level": { 2125 | "type": 4 2126 | }, 2127 | "aria-posinset": { 2128 | "type": 2 2129 | }, 2130 | "aria-rowcount": { 2131 | "type": 3 2132 | }, 2133 | "aria-rowindex": { 2134 | "type": 2 2135 | }, 2136 | "aria-rowspan": { 2137 | "type": 1 2138 | }, 2139 | "aria-setsize": { 2140 | "type": 3 2141 | } 2142 | }; 2143 | 2144 | var arValidARIAAttributes = ["aria-activedescendant", "aria-atomic", "aria-autocomplete", "aria-busy", "aria-checked", "aria-colcount", "aria-colindex", "aria-colspan", "aria-controls", "aria-current", "aria-describedby", "aria-details", "aria-disabled", "aria-dropeffect", "aria-errormessage", "aria-expanded", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-level", "aria-live", "aria-modal", "aria-multiline", "aria-multiselectable", "aria-orientation", "aria-owns", "aria-placeholder", "aria-posinset", "aria-pressed", "aria-readonly", "aria-relevant", "aria-required", "aria-roledescription", "aria-rowcount", "aria-rowindex", "aria-rowspan", "aria-selected", "aria-setsize", "aria-sort", "aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext"]; 2145 | 2146 | var arPhrasing = ["a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "emembed", "i", "iframe", "img", "input", "ins", "kbd", "label", "link", "map", "mark", "math", "meta", "meter", "noscript", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "script", "select", "slot", "small", "span", "strong", "sub", "sup", "svg", "template", "text", "area", "time", "u", "var", "video", "wbr"]; 2147 | var arInteractive = ["a", "audio", "button", "details", "embed", "iframe", "img", "input", "label", "object", "select", "textarea", "video"]; 2148 | var arValidRoles=[]; 2149 | var bDetails = false; 2150 | var objWin; 2151 | 2152 | function conditionalElement(objElement, strElement) { 2153 | var strType; 2154 | 2155 | switch (strElement) { 2156 | case "a" : 2157 | if (objElement.hasAttribute("href")) { 2158 | return "ahref"; 2159 | } 2160 | else { 2161 | return "anohref"; 2162 | } 2163 | case "area" : 2164 | if (!objElement.hasAttribute("href")) { 2165 | return "areanohref"; 2166 | } 2167 | break; 2168 | case "img" : 2169 | if (!objElement.hasAttribute("alt")) { 2170 | if (objElement.hasAttribute("title") || objElement.hasAttribute("aria-label") || objElement.hasAttribute("aria-labelledby")) { 2171 | return strElement; 2172 | } 2173 | return "img-noalt"; 2174 | } 2175 | if (!objElement.getAttribute("alt")) { 2176 | return "img-emptyalt"; 2177 | } 2178 | break; 2179 | case "figure" : 2180 | if (objElement.getElementsByTagName("figcaption").length === 0) { 2181 | return "figure-nofigcap"; 2182 | } 2183 | break; 2184 | case "input" : 2185 | strType = objElement.getAttribute("type"); 2186 | if (!strType || strType === "password") { 2187 | strType = "password"; 2188 | } 2189 | return strElement + "-" + strType.toLowerCase(); 2190 | case "select" : 2191 | if (objElement.hasAttribute("multiple") || objElement.hasAttribute("size")) { 2192 | return "select-nomenu"; 2193 | } 2194 | } 2195 | return strElement; 2196 | } 2197 | 2198 | function createResultsWindow(objValidWAIAria) { 2199 | var objResultsWindow = document.createElement("div"); 2200 | var objContainer = document.createElement("div"); 2201 | var objHeading = document.createElement("h1"); 2202 | var objSubHeading = document.createElement("h2"); 2203 | var objClose = document.createElement("button"); 2204 | var objCSS = document.createElement("link"); 2205 | var objTitle = document.createElement("title"); 2206 | var i; 2207 | 2208 | objWin = window.open(""); 2209 | objCSS.setAttribute("rel", "stylesheet"); 2210 | objCSS.setAttribute("type", "text/css"); 2211 | objCSS.setAttribute("href", "https://juicystudio.com/tpg/ARC/aria-usage.css"); 2212 | objTitle.appendChild(document.createTextNode("WAI-ARIA usage results")); 2213 | objWin.document.getElementsByTagName("HTML")[0].setAttribute("lang", "en"); 2214 | objWin.document.getElementsByTagName("HEAD")[0].appendChild(objCSS); 2215 | objWin.document.getElementsByTagName("HEAD")[0].appendChild(objTitle); 2216 | 2217 | objResultsWindow.setAttribute("id", "__ARIA_validator_resultsWindow__"); 2218 | objHeading.setAttribute("id", "__ARIA_validator_dlgtitle__"); 2219 | objHeading.appendChild(document.createTextNode("WAI-ARIA usage results")); 2220 | objResultsWindow.appendChild(objHeading); 2221 | objContainer.setAttribute("id", "__ARIA_validator_summary__"); 2222 | objSubHeading.appendChild(document.createTextNode("Summary")); 2223 | objContainer.appendChild(objSubHeading); 2224 | objResultsWindow.appendChild(objContainer); 2225 | objSubHeading = document.createElement("h2"); 2226 | objSubHeading.appendChild(document.createTextNode("Details")); 2227 | objResultsWindow.appendChild(objSubHeading); 2228 | 2229 | // Set up containers for the groups 2230 | for (i in objValidWAIAria) { 2231 | if (i !== "valid") { 2232 | objContainer = document.createElement("div"); 2233 | objContainer.setAttribute("id", i + "Container"); 2234 | objResultsWindow.appendChild(objContainer); 2235 | } 2236 | } 2237 | 2238 | objWin.document.body.appendChild(objResultsWindow); 2239 | } 2240 | 2241 | function getDetails() { 2242 | var objList = document.createElement("ul"); 2243 | var objListItem; 2244 | var objCode; 2245 | var iInstances; 2246 | var i; 2247 | 2248 | for (i in arValidRoles) { 2249 | objListItem = document.createElement("li"); 2250 | objCode = document.createElement("code"); 2251 | 2252 | iInstances = arValidRoles[i][1]; 2253 | if (iInstances) { 2254 | if (iInstances === 1) { 2255 | objListItem.appendChild(document.createTextNode("1 instance of ")); 2256 | } 2257 | else { 2258 | objListItem.appendChild(document.createTextNode(iInstances + " instances of ")); 2259 | } 2260 | 2261 | objCode.appendChild(document.createTextNode(arValidRoles[i][0])); 2262 | objListItem.appendChild(objCode); 2263 | objList.appendChild(objListItem); 2264 | } 2265 | } 2266 | return objList; 2267 | } 2268 | 2269 | function getIndex(strRole) { 2270 | var i; 2271 | 2272 | for (i in arValidRoles) { 2273 | if (arValidRoles[i][0] === strRole) { 2274 | return i; 2275 | } 2276 | } 2277 | 2278 | return -1; 2279 | } 2280 | 2281 | function displaySummary(objValidWAIAria) { 2282 | var objList = document.createElement("ul"); 2283 | var objListItem; 2284 | var objAnchor; 2285 | var objDetails = document.createElement("details"); 2286 | var i; 2287 | var bAppend; 2288 | var objDetSum; 2289 | var objDetList; 2290 | var strPhrase; 2291 | var objSummary = objWin.document.getElementById("__ARIA_validator_summary__"); 2292 | 2293 | for(i in objValidWAIAria) { 2294 | objListItem = document.createElement("li"); 2295 | objAnchor = document.createElement("a"); 2296 | objAnchor.setAttribute("href", "#" + i + "Head"); 2297 | bAppend = true; 2298 | switch (i) { 2299 | case "valid": 2300 | if (objValidWAIAria[i] > 0) { 2301 | objDetSum = document.createElement("summary"); 2302 | objDetSum.appendChild(document.createTextNode(objValidWAIAria[i] + " valid roles.")); 2303 | objDetails.appendChild(objDetSum); 2304 | objDetails.appendChild(getDetails()); 2305 | objSummary.appendChild(objDetails); 2306 | bAppend = false; 2307 | } 2308 | else { 2309 | objListItem.appendChild(document.createTextNode("0 valid roles.")); 2310 | bAppend = false; 2311 | } 2312 | break; 2313 | case "unknown": 2314 | strPhrase = objValidWAIAria[i] + " unknown elements."; 2315 | break; 2316 | case "nonexistent": 2317 | strPhrase = objValidWAIAria[i] + " non-existent roles."; 2318 | break; 2319 | case "missingparent": 2320 | strPhrase = objValidWAIAria[i] + " missing parent roles."; 2321 | break; 2322 | case "missingchild": 2323 | strPhrase = objValidWAIAria[i] + " missing child roles."; 2324 | break; 2325 | case "missingstate": 2326 | strPhrase = objValidWAIAria[i] + " roles without required states."; 2327 | break; 2328 | case "invalidproperty": 2329 | strPhrase = objValidWAIAria[i] + " elements with invalid WAI-ARIA attributes."; 2330 | break; 2331 | case "invaliddesc": 2332 | strPhrase = objValidWAIAria[i] + " elements with invalid descendants."; 2333 | break; 2334 | case "invalidref": 2335 | strPhrase = objValidWAIAria[i] + " attribute values without corresponding targets."; 2336 | break; 2337 | case "deprecatedattribute": 2338 | strPhrase = objValidWAIAria[i] + " deprecated attributes."; 2339 | break; 2340 | case "dpub": 2341 | if (objValidWAIAria[i] > 0) { 2342 | strPhrase = objValidWAIAria[i] + " valid DPub roles. Note: although valid, DPUB roles are likely not recognized on the web."; 2343 | objListItem.appendChild(document.createTextNode(strPhrase)); 2344 | objList.appendChild(objListItem); 2345 | } 2346 | bAppend = false; 2347 | break; 2348 | default: 2349 | strPhrase = objValidWAIAria[i] + " " + i + " roles."; 2350 | } 2351 | if (bAppend) { 2352 | if (objValidWAIAria[i] > 0) { 2353 | objAnchor.appendChild(document.createTextNode(strPhrase)); 2354 | objListItem.appendChild(objAnchor); 2355 | } 2356 | else { 2357 | objListItem.appendChild(document.createTextNode(strPhrase)); 2358 | } 2359 | objList.appendChild(objListItem); 2360 | } 2361 | } 2362 | 2363 | objSummary.appendChild(objList); 2364 | } 2365 | 2366 | function addHeading(objGroup, strTargetContainer) { 2367 | var objHeading = document.createElement("h3"); 2368 | var objBTT = document.createElement("a"); 2369 | 2370 | objBTT.setAttribute("href", "#__ARIA_validator_summary__"); 2371 | objBTT.appendChild(document.createTextNode("Back to the top")); 2372 | 2373 | objHeading.setAttribute("id", strTargetContainer + "Head"); 2374 | 2375 | switch (strTargetContainer) { 2376 | case "invalid": 2377 | objHeading.appendChild(document.createTextNode("Invalid roles")); 2378 | break; 2379 | case "unnecessary": 2380 | objHeading.appendChild(document.createTextNode("Unnecessary roles")); 2381 | break; 2382 | case "unknown": 2383 | objHeading.appendChild(document.createTextNode("Unknown elements")); 2384 | break; 2385 | case "nonexistent": 2386 | objHeading.appendChild(document.createTextNode("Non-existent roles")); 2387 | break; 2388 | case "missingparent": 2389 | objHeading.appendChild(document.createTextNode("Missing parent roles")); 2390 | break; 2391 | case "missingchild": 2392 | objHeading.appendChild(document.createTextNode("Missing child roles")); 2393 | break; 2394 | case "missingstate": 2395 | objHeading.appendChild(document.createTextNode("Missing required state")); 2396 | break; 2397 | case "invalidproperty": 2398 | objHeading.appendChild(document.createTextNode("Invalid properties")); 2399 | break; 2400 | case "invaliddesc": 2401 | objHeading.appendChild(document.createTextNode("Invalid descendants")); 2402 | break; 2403 | case "invalidref": 2404 | objHeading.appendChild(document.createTextNode("Invalid references")); 2405 | break; 2406 | case "deprecated": 2407 | objHeading.appendChild(document.createTextNode("Deprecated roles")); 2408 | break; 2409 | case "deprecatedattribute": 2410 | objHeading.appendChild(document.createTextNode("Deprecated attributes")); 2411 | } 2412 | objGroup.appendChild(objHeading); 2413 | objGroup.appendChild(objBTT) 2414 | } 2415 | 2416 | function logResult(strMessage, strElement, strError, strRole, objCode, strMissing, strTargetContainer) { 2417 | var objGroup = objWin.document.getElementById(strTargetContainer + "Container"); 2418 | var objMessage = document.createElement("p"); 2419 | var objElement = document.createElement("code"); 2420 | var objRole = document.createElement("code"); 2421 | var objPre = document.createElement("pre"); 2422 | var objMarkup = document.createElement("code"); 2423 | 2424 | if (objGroup.childNodes.length === 0) { 2425 | addHeading(objGroup, strTargetContainer); 2426 | } 2427 | objElement.appendChild(document.createTextNode(strElement)); 2428 | objRole.appendChild(document.createTextNode(strRole)); 2429 | 2430 | if (strMessage === "") { 2431 | objMessage.appendChild(objRole); 2432 | objMessage.appendChild(document.createTextNode(" is unnecessary on native ")); 2433 | objMessage.appendChild(objElement); 2434 | objMessage.appendChild(document.createTextNode(" elements")); 2435 | } 2436 | else { 2437 | objMessage.appendChild(document.createTextNode(strMessage)); 2438 | objMessage.appendChild(objElement); 2439 | objMessage.appendChild(document.createTextNode(strError)); 2440 | objMessage.appendChild(objRole); 2441 | objMessage.appendChild(document.createTextNode(strMissing)); 2442 | objMessage.appendChild(document.createTextNode(" There may be additional issues with this element.")); 2443 | } 2444 | 2445 | objGroup.appendChild(objMessage); 2446 | 2447 | if (objCode) { 2448 | objMarkup.appendChild(document.createTextNode(objCode.outerHTML)); 2449 | objPre.appendChild(objMarkup); 2450 | objGroup.appendChild(objPre); 2451 | } 2452 | bDetails = true; 2453 | } 2454 | 2455 | function checkConditionalInteractive(strElement, objElement) { 2456 | switch (strElement) { 2457 | case "a": 2458 | if (objElement.hasAttribute("href")) { 2459 | return false; 2460 | } 2461 | return true; 2462 | case "audio": 2463 | case "video": 2464 | if (objElement.hasAttribute("controls")) { 2465 | return false; 2466 | } 2467 | return true; 2468 | case "img": 2469 | case "object": 2470 | if (objElement.hasAttribute("usemap")) { 2471 | return false; 2472 | } 2473 | return true; 2474 | case "input": 2475 | if (objElement.getAttribute("type") !== "hidden") { 2476 | return false; 2477 | } 2478 | return true; 2479 | } 2480 | return false; 2481 | } 2482 | 2483 | function checkValidDescendant(objElement, strRole) { 2484 | var arCheckDescendant = objRoleRules[strRole].descendantRestrictions; 2485 | var strParentElement = objElement.tagName.toLowerCase(); 2486 | var strParentRole = objElement.getAttribute("role"); 2487 | var strElement; 2488 | var strChildRole; 2489 | var objParent = objElement; 2490 | var i; 2491 | 2492 | if (strParentRole !== "") { 2493 | strParentElement = strParentElement + " role=" + strParentRole; 2494 | } 2495 | if (arCheckDescendant) { 2496 | switch (arCheckDescendant[0]) { 2497 | case "phrasing": 2498 | // For definition or term roles 2499 | for (i=0; i