Skip to content

Commit

Permalink
feat: Add colindextext and rowindextext
Browse files Browse the repository at this point in the history
  • Loading branch information
estevezluis committed Oct 23, 2024
1 parent c151daf commit bb529d7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __tests__/src/ariaPropsMaps-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const entriesList = [
['aria-checked', {'type': 'tristate'}],
['aria-colcount', {type: 'integer',}],
['aria-colindex', {type: 'integer',}],
['aria-colindextext', {type: 'string',}],
['aria-colspan', {type: 'integer',}],
['aria-controls', {'type': 'idlist'}],
['aria-current', {type: 'token',values: ['page','step','location','date','time',true,false,],}],
Expand Down Expand Up @@ -51,6 +52,7 @@ const entriesList = [
['aria-roledescription', {type: 'string',}],
['aria-rowcount', {type: 'integer',}],
['aria-rowindex', {type: 'integer',}],
['aria-rowindextext', {type: 'string',}],
['aria-rowspan', {type: 'integer',}],
['aria-selected', {'type': 'boolean','allowundefined': true}],
['aria-setsize', {'type': 'integer'}],
Expand All @@ -64,7 +66,7 @@ const entriesList = [
test('ariaPropsMap API', (t) => {
const predicate = (obj, [o]) => deepEqual(o, obj);

testIteration(t, ariaPropsMap, entriesList, 51, predicate);
testIteration(t, ariaPropsMap, entriesList, 53, predicate);

testForEach(t, ariaPropsMap, entriesList, predicate);

Expand Down
4 changes: 4 additions & 0 deletions flow/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ type ARIAProperty =
| 'aria-brailleroledescription'
| 'aria-colcount'
| 'aria-colindex'
| 'aria-colindextext'
| 'aria-colspan'
| 'aria-controls'
| 'aria-current'
Expand Down Expand Up @@ -262,6 +263,7 @@ type ARIAProperty =
| 'aria-roledescription'
| 'aria-rowcount'
| 'aria-rowindex'
| 'aria-rowindextext'
| 'aria-rowspan'
| 'aria-setsize'
| 'aria-sort'
Expand All @@ -282,6 +284,7 @@ type ARIAPropertyMap = {|
'aria-checked'?: mixed,
'aria-colcount'?: mixed,
'aria-colindex'?: mixed,
'aria-colindextext'?: mixed,
'aria-colspan'?: mixed,
'aria-controls'?: mixed,
'aria-current'?: ?ARIAPropertyCurrent,
Expand Down Expand Up @@ -316,6 +319,7 @@ type ARIAPropertyMap = {|
'aria-roledescription'?: mixed,
'aria-rowcount'?: mixed,
'aria-rowindex'?: mixed,
'aria-rowindextext'?: mixed,
'aria-rowspan'?: mixed,
'aria-selected'?: mixed,
'aria-setsize'?: mixed,
Expand Down
9 changes: 9 additions & 0 deletions scripts/roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"aria-atomic",
"aria-busy",
"aria-colindex",
"aria-colindextext",
"aria-colspan",
"aria-controls",
"aria-current",
Expand All @@ -395,6 +396,7 @@
"aria-relevant",
"aria-roledescription",
"aria-rowindex",
"aria-rowindextext",
"aria-rowspan"
],
"relatedConcepts": [
Expand Down Expand Up @@ -516,6 +518,7 @@
"aria-atomic",
"aria-busy",
"aria-colindex",
"aria-colindextext",
"aria-colspan",
"aria-controls",
"aria-current",
Expand All @@ -540,6 +543,7 @@
"aria-required",
"aria-roledescription",
"aria-rowindex",
"aria-rowindextext",
"aria-rowspan",
"aria-selected",
"aria-sort"
Expand Down Expand Up @@ -3375,6 +3379,7 @@
"aria-atomic",
"aria-busy",
"aria-colindex",
"aria-colindextext",
"aria-colspan",
"aria-controls",
"aria-current",
Expand All @@ -3399,6 +3404,7 @@
"aria-required",
"aria-roledescription",
"aria-rowindex",
"aria-rowindextext",
"aria-rowspan",
"aria-selected"
],
Expand Down Expand Up @@ -4978,6 +4984,7 @@
"aria-relevant",
"aria-roledescription",
"aria-rowindex",
"aria-rowindextext",
"aria-selected",
"aria-setsize"
],
Expand Down Expand Up @@ -5059,6 +5066,7 @@
"aria-atomic",
"aria-busy",
"aria-colindex",
"aria-colindextext",
"aria-colspan",
"aria-controls",
"aria-current",
Expand All @@ -5083,6 +5091,7 @@
"aria-required",
"aria-roledescription",
"aria-rowindex",
"aria-rowindextext",
"aria-rowspan",
"aria-selected",
"aria-sort"
Expand Down
6 changes: 6 additions & 0 deletions src/ariaPropsMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const properties: ARIAPropertyDefinitions = [
['aria-colindex', {
type: 'integer',
}],
['aria-colindextext', {
type: 'string',
}],
['aria-colspan', {
type: 'integer',
}],
Expand Down Expand Up @@ -194,6 +197,9 @@ const properties: ARIAPropertyDefinitions = [
['aria-rowindex', {
type: 'integer',
}],
['aria-rowindextext', {
type: 'string',
}],
['aria-rowspan', {
type: 'integer',
}],
Expand Down
2 changes: 2 additions & 0 deletions src/etc/roles/literal/cellRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ const cellRole: ARIARoleDefinition = {
prohibitedProps: [],
props: {
'aria-colindex': null,
'aria-colindextext': null,
'aria-colspan': null,
'aria-rowindex': null,
'aria-rowindextext': null,
'aria-rowspan': null,
},
relatedConcepts: [
Expand Down
1 change: 1 addition & 0 deletions src/etc/roles/literal/rowRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const rowRole: ARIARoleDefinition = {
'aria-level': null,
'aria-posinset': null,
'aria-rowindex': null,
'aria-rowindextext': null,
'aria-selected': null,
'aria-setsize': null,
},
Expand Down

0 comments on commit bb529d7

Please sign in to comment.