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

fix(aria-allowed-attr): align rowcount, colcount, and colindex with 1.1 spec #555

Merged
merged 1 commit into from
Oct 10, 2017
Merged
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
14 changes: 8 additions & 6 deletions lib/commons/aria/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ lookupTables.role = {
'columnheader': {
type: 'structure',
attributes: {
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan',
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan',
'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort']
},
owned: null,
Expand Down Expand Up @@ -341,7 +341,7 @@ lookupTables.role = {
attributes: {
allowed: ['aria-expanded']
},
owned: {
owned: {
one: ['article']
},
nameFrom: ['author'],
Expand All @@ -360,7 +360,8 @@ lookupTables.role = {
'grid': {
type: 'composite',
attributes: {
allowed: ['aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-expanded']
allowed: ['aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level',
'aria-multiselectable', 'aria-readonly', 'aria-rowcount']
},
owned: {
one: ['rowgroup', 'row']
Expand All @@ -372,7 +373,7 @@ lookupTables.role = {
'gridcell': {
type: 'widget',
attributes: {
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex',
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex',
'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required']
},
owned: null,
Expand Down Expand Up @@ -645,7 +646,8 @@ lookupTables.role = {
'row': {
type: 'structure',
attributes: {
allowed: ['aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowcount', 'aria-rowindex']
allowed: ['aria-activedescendant', 'aria-colindex', 'aria-expanded',
'aria-level', 'aria-selected', 'aria-rowindex']
},
owned: {
one: ['cell', 'columnheader', 'rowheader', 'gridcell']
Expand All @@ -669,7 +671,7 @@ lookupTables.role = {
'rowheader': {
type: 'structure',
attributes: {
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan',
allowed: ['aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan',
'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort']
},
owned: null,
Expand Down
2 changes: 2 additions & 0 deletions test/integration/rules/aria-allowed-attr/failures.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

<div role="alert" aria-selected="true" id="fail1">fail</div>
<div role="link" aria-selected="true" id="fail2">fail</div>
<div role="row" aria-colcount="value" id="fail3">fail</div>
<div role="row" aria-rowcount="value" id="fail4">fail</div>
4 changes: 2 additions & 2 deletions test/integration/rules/aria-allowed-attr/failures.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"description": "aria-allowed-attr failing tests",
"rule": "aria-allowed-attr",
"violations": [
["#fail1"], ["#fail2"]
["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"]
]
}
}
4 changes: 2 additions & 2 deletions test/integration/rules/aria-allowed-attr/passes.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<div role="form" id="pass17" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>

<div role="grid" id="pass18" aria-level="value" aria-multiselectable="value" aria-readonly="value" aria-activedescendant="value" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>
<div role="grid" id="pass18" aria-level="value" aria-multiselectable="value" aria-readonly="value" aria-activedescendant="value" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value" aria-colcount="value" aria-rowcount="value">ok</div>

<div role="gridcell" id="pass19" aria-colindex="value" aria-colspan="value" aria-rowindex="value" aria-rowspan="value" aria-selected="value" aria-readonly="value" aria-expanded="value" aria-required="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>

Expand Down Expand Up @@ -85,7 +85,7 @@

<div role="region" id="pass42" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>

<div role="row" id="pass43" aria-colcount="value" aria-rowcount="value" aria-rowindex="value" aria-level="value" aria-selected="value" aria-activedescendant="value" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>
<div role="row" id="pass43" aria-colindex="value" aria-rowindex="value" aria-level="value" aria-selected="value" aria-activedescendant="value" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>

<div role="rowgroup" id="pass44" aria-activedescendant="value" aria-expanded="value" aria-atomic="value" aria-busy="value" aria-controls="value" aria-describedby="value" aria-disabled="value" aria-dropeffect="value" aria-flowto="value" aria-grabbed="value" aria-haspopup="value" aria-hidden="value" aria-invalid="value" aria-keyshortcuts="value" aria-label="value" aria-labelledby="value" aria-live="value" aria-owns="value" aria-relevant="value">ok</div>

Expand Down