Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add colindextext and rowindextext #589

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading