aria-api

access ARIA information from JavaScript
git clone https://git.ce9e.org/aria-api.git

commit
3d32170997b71bccd95ab421158f206860bcb042
parent
9bfd594ff7439ddee791e8eddfbddd12502f124e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-01-30 08:07
add new roles and attributes for ARIA 1.3

Diffstat

M lib/constants.js 17 +++++++++++++++--

1 files changed, 15 insertions, 2 deletions


diff --git a/lib/constants.js b/lib/constants.js

@@ -3,14 +3,18 @@ exports.attributes = {
    3     3 	'activedescendant': 'id',
    4     4 	'atomic': 'bool',
    5     5 	'autocomplete': 'token',
   -1     6 	'braillelabel': 'string',
   -1     7 	'brailleroledescription': 'string',
    6     8 	'busy': 'bool',
    7     9 	'checked': 'tristate',
    8    10 	'colcount': 'int',
    9    11 	'colindex': 'int',
   -1    12 	'colindextext': 'string',
   10    13 	'colspan': 'int',
   11    14 	'controls': 'id-list',
   12    15 	'current': 'token',
   13    16 	'describedby': 'id-list',
   -1    17 	'description': 'string',
   14    18 	'details': 'id',
   15    19 	'disabled': 'bool',
   16    20 	'dropeffect': 'token-list',
@@ -40,6 +44,7 @@ exports.attributes = {
   40    44 	'roledescription': 'string',
   41    45 	'rowcount': 'int',
   42    46 	'rowindex': 'int',
   -1    47 	'rowindextext': 'string',
   43    48 	'rowspan': 'int',
   44    49 	'selected': 'bool-undefined',
   45    50 	'setsize': 'int',
@@ -96,6 +101,7 @@ exports.roles = {
   96   101 	application: {},
   97   102 	article: {
   98   103 		selectors: ['article'],
   -1   104 		childRoles: ['comment'],
   99   105 	},
  100   106 	banner: {
  101   107 		selectors: [`header:not(main *, ${scoped})`],
@@ -158,6 +164,9 @@ exports.roles = {
  158   164 		abstract: true,
  159   165 		childRoles: ['button', 'link', 'menuitem'],
  160   166 	},
   -1   167 	comment: {
   -1   168 		nameFromContents: true,
   -1   169 	},
  161   170 	complementary: {
  162   171 		selectors: [
  163   172 			`aside:not(${scoped})`,
@@ -408,6 +417,9 @@ exports.roles = {
  408   417 	main: {
  409   418 		selectors: ['main'],
  410   419 	},
   -1   420 	mark: {
   -1   421 		selectors: ['mark'],
   -1   422 	},
  411   423 	marquee: {},
  412   424 	math: {
  413   425 		selectors: ['math'],
@@ -431,11 +443,10 @@ exports.roles = {
  431   443 		},
  432   444 	},
  433   445 	menuitem: {
  434    -1 		childRoles: ['menuitemcheckbox'],
   -1   446 		childRoles: ['menuitemcheckbox', 'menuitemradio'],
  435   447 		nameFromContents: true,
  436   448 	},
  437   449 	menuitemcheckbox: {
  438    -1 		childRoles: ['menuitemradio'],
  439   450 		nameFromContents: true,
  440   451 		defaults: {
  441   452 			'checked': 'false',
@@ -548,6 +559,7 @@ exports.roles = {
  548   559 			'list',
  549   560 			'listitem',
  550   561 			'log',
   -1   562 			'mark',
  551   563 			'marquee',
  552   564 			'math',
  553   565 			'note',
@@ -555,6 +567,7 @@ exports.roles = {
  555   567 			'status',
  556   568 			'strong',
  557   569 			'subscript',
   -1   570 			'suggestion',
  558   571 			'superscript',
  559   572 			'table',
  560   573 			'tabpanel',