- commit
- c0160bff94b457eb7a4818ddcb26b5445ddb3dc9
- parent
- b905aed2a4f7af77d029a5a2886ef7c2176cafd2
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-06-07 11:51
update to aria-1.2
Diffstat
| M | README.md | 2 | +- |
| M | lib/constants.js | 96 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++------ |
2 files changed, 88 insertions, 10 deletions
diff --git a/README.md b/README.md
@@ -106,7 +106,7 @@ That said, this is what I think it could also be used for: 106 106 107 107 # Implemented standards 108 108109 -1 - [Accessible Rich Internet Applications 1.1](https://www.w3.org/TR/wai-aria-1.1/)-1 109 - [Accessible Rich Internet Applications 1.2](https://www.w3.org/TR/wai-aria-1.2/) 110 110 - [HTML Accessibility API Mappings 1.0](https://www.w3.org/TR/html-aam-1.0/) 111 111 - [WAI-ARIA Graphics Module 1.0](https://www.w3.org/TR/graphics-aria-1.0/) 112 112 - [Digital Publishing WAI-ARIA Module 1.0](https://www.w3.org/TR/dpub-aria-1.0/)
diff --git a/lib/constants.js b/lib/constants.js
@@ -90,6 +90,9 @@ exports.roles = {
90 90 banner: {
91 91 selectors: ['header:not(' + scoped + ')'],
92 92 },
-1 93 blockquote: {
-1 94 selectors: ['blockquote'],
-1 95 },
93 96 button: {
94 97 selectors: [
95 98 'button',
@@ -101,19 +104,25 @@ exports.roles = {
101 104 ],
102 105 nameFromContents: true,
103 106 },
-1 107 caption: {
-1 108 selectors: ['caption', 'figcaption'],
-1 109 },
104 110 cell: {
105 111 selectors: ['td'],
106 -1 childRoles: ['gridcell', 'rowheader'],
-1 112 childRoles: ['columnheader', 'gridcell', 'rowheader'],
107 113 nameFromContents: true,
108 114 },
109 115 checkbox: {
110 116 selectors: ['input[type="checkbox"]'],
111 -1 childRoles: ['menuitemcheckbox', 'switch'],
-1 117 childRoles: ['switch'],
112 118 nameFromContents: true,
113 119 defaults: {
114 120 'checked': 'false',
115 121 },
116 122 },
-1 123 code: {
-1 124 selectors: ['code'],
-1 125 },
117 126 columnheader: {
118 127 selectors: ['th[scope="col"]'],
119 128 nameFromContents: true,
@@ -150,6 +159,9 @@ exports.roles = {
150 159 definition: {
151 160 selectors: ['dd'],
152 161 },
-1 162 deletion: {
-1 163 selectors: ['del', 's'],
-1 164 },
153 165 dialog: {
154 166 selectors: ['dialog'],
155 167 childRoles: ['alertdialog'],
@@ -170,12 +182,18 @@ exports.roles = {
170 182 selectors: ['body'],
171 183 childRoles: ['article', 'graphics-document'],
172 184 },
-1 185 emphasis: {
-1 186 selectors: ['em'],
-1 187 },
173 188 figure: {
174 189 selectors: ['figure'],
175 190 },
176 191 form: {
177 192 selectors: ['form[aria-label]', 'form[aria-labelledby]', 'form[title]'],
178 193 },
-1 194 generic: {
-1 195 // too many selectors to list
-1 196 },
179 197 grid: {
180 198 childRoles: ['treegrid'],
181 199 },
@@ -199,7 +217,18 @@ exports.roles = {
199 217 childRoles: ['doc-cover'],
200 218 },
201 219 input: {
202 -1 childRoles: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],
-1 220 childRoles: [
-1 221 'checkbox',
-1 222 'combobox',
-1 223 'option',
-1 224 'radio',
-1 225 'slider',
-1 226 'spinbutton',
-1 227 'textbox',
-1 228 ],
-1 229 },
-1 230 insertion: {
-1 231 selectors: ['ins'],
203 232 },
204 233 landmark: {
205 234 childRoles: [
@@ -262,6 +291,13 @@ exports.roles = {
262 291 math: {
263 292 selectors: ['math'],
264 293 },
-1 294 meter: {
-1 295 selectors: ['meter'],
-1 296 defaults: {
-1 297 'valuemin': 0,
-1 298 'valuemax': 100,
-1 299 },
-1 300 },
265 301 menu: {
266 302 selectors: ['menu[type="context"]'],
267 303 childRoles: ['menubar'],
@@ -309,11 +345,18 @@ exports.roles = {
309 345 'selected': 'false',
310 346 },
311 347 },
-1 348 paragraph: {
-1 349 selectors: ['p'],
-1 350 },
312 351 presentation: {
313 352 selectors: ['img[alt=""]'],
314 353 },
315 354 progressbar: {
316 355 selectors: ['progress'],
-1 356 defaults: {
-1 357 'valuemin': 0,
-1 358 'valuemax': 100,
-1 359 },
317 360 },
318 361 radio: {
319 362 selectors: ['input[type="radio"]'],
@@ -324,7 +367,7 @@ exports.roles = {
324 367 },
325 368 },
326 369 range: {
327 -1 childRoles: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],
-1 370 childRoles: ['meter', 'progressbar', 'scrollbar', 'slider', 'spinbutton'],
328 371 },
329 372 region: {
330 373 selectors: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],
@@ -338,7 +381,6 @@ exports.roles = {
338 381 },
339 382 rowgroup: {
340 383 selectors: ['tbody', 'thead', 'tfoot'],
341 -1 nameFromContents: true,
342 384 },
343 385 rowheader: {
344 386 selectors: ['th[scope="row"]'],
@@ -351,14 +393,21 @@ exports.roles = {
351 393 'valuemax': 100,
352 394 },
353 395 },
-1 396 search: {
-1 397 selectors: ['search'],
-1 398 },
354 399 searchbox: {
355 400 selectors: ['input[type="search"]:not([list])'],
356 401 },
357 402 section: {
358 403 childRoles: [
359 404 'alert',
-1 405 'blockquote',
-1 406 'caption',
360 407 'cell',
-1 408 'code',
361 409 'definition',
-1 410 'deletion',
362 411 'doc-abstract',
363 412 'doc-colophon',
364 413 'doc-credit',
@@ -367,9 +416,11 @@ exports.roles = {
367 416 'doc-example',
368 417 'doc-footnote',
369 418 'doc-qna',
-1 419 'emphasis',
370 420 'figure',
371 421 'group',
372 422 'img',
-1 423 'insertion',
373 424 'landmark',
374 425 'list',
375 426 'listitem',
@@ -377,10 +428,15 @@ exports.roles = {
377 428 'marquee',
378 429 'math',
379 430 'note',
-1 431 'paragraph',
380 432 'status',
-1 433 'strong',
-1 434 'subscript',
-1 435 'superscript',
381 436 'table',
382 437 'tabpanel',
383 438 'term',
-1 439 'time',
384 440 'tooltip',
385 441 ],
386 442 },
@@ -395,7 +451,7 @@ exports.roles = {
395 451 nameFromContents: true,
396 452 },
397 453 select: {
398 -1 childRoles: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],
-1 454 childRoles: ['listbox', 'menu', 'radiogroup', 'tree'],
399 455 },
400 456 separator: {
401 457 // assume not focussable because <hr> is not
@@ -403,6 +459,8 @@ exports.roles = {
403 459 childRoles: ['doc-pagebreak'],
404 460 defaults: {
405 461 'orientation': 'horizontal',
-1 462 'valuemin': 0,
-1 463 'valuemax': 100,
406 464 },
407 465 },
408 466 slider: {
@@ -418,8 +476,7 @@ exports.roles = {
418 476 spinbutton: {
419 477 selectors: ['input[type="number"]'],
420 478 defaults: {
421 -1 // FIXME: no valuemin/valuemax
422 -1 'valuenow': 0,
-1 479 // FIXME: no valuemin/valuemax/valuenow
423 480 },
424 481 },
425 482 status: {
@@ -430,18 +487,29 @@ exports.roles = {
430 487 'atomic': true,
431 488 },
432 489 },
-1 490 strong: {
-1 491 selectors: ['strong'],
-1 492 },
433 493 structure: {
434 494 childRoles: [
435 495 'application',
436 496 'document',
437 497 'none',
-1 498 'generic',
438 499 'presentation',
-1 500 'range',
439 501 'rowgroup',
440 502 'section',
441 503 'sectionhead',
442 504 'separator',
443 505 ],
444 506 },
-1 507 subscript: {
-1 508 selectors: ['sub'],
-1 509 },
-1 510 superscript: {
-1 511 selectors: ['sup'],
-1 512 },
445 513 switch: {
446 514 nameFromContents: true,
447 515 defaults: {
@@ -477,6 +545,14 @@ exports.roles = {
477 545 ],
478 546 childRoles: ['searchbox'],
479 547 },
-1 548 time: {
-1 549 selectors: ['time'],
-1 550 },
-1 551 timer: {
-1 552 defaults: {
-1 553 'live': 'off',
-1 554 },
-1 555 },
480 556 toolbar: {
481 557 defaults: {
482 558 'orientation': 'horizontal',
@@ -500,8 +576,10 @@ exports.roles = {
500 576 'composite',
501 577 'gridcell',
502 578 'input',
503 -1 'range',
-1 579 'progressbar',
504 580 'row',
-1 581 'scrollbar',
-1 582 'separator',
505 583 'tab',
506 584 ],
507 585 },