Skip to content

Commit

Permalink
Merge branch 'dequelabs:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-tripp authored Sep 10, 2021
2 parents ac32146 + d0d1d59 commit 6e389a1
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 5 deletions.
1 change: 1 addition & 0 deletions doc/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ Add your project/integration to this file and submit a pull request.
1. [axe-sarif-converter](https://github.com/microsoft/axe-sarif-converter)
1. [Selenium.Axe for .NET](https://github.com/TroyWalshProf/SeleniumAxeDotnet)
1. [vue-axe](https://github.com/vue-a11y/vue-axe-next)
1. [a11y-sitechecker](https://github.com/forsti0506/a11y-sitechecker)
16 changes: 16 additions & 0 deletions lib/standards/aria-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ const ariaRoles = {
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
comment: {
type: 'structure',
allowedAttrs: ['aria-level', 'aria-posinset', 'aria-setsize'],
superclassRole: ['article']
},
definition: {
type: 'structure',
allowedAttrs: ['aria-expanded'],
Expand Down Expand Up @@ -391,6 +396,11 @@ const ariaRoles = {
accessibleNameRequired: true,
childrenPresentational: true
},
mark: {
type: 'structure',
superclassRole: ['section'],
prohibitedAttrs: ['aria-label', 'aria-labelledby']
},
navigation: {
type: 'landmark',
allowedAttrs: ['aria-expanded'],
Expand Down Expand Up @@ -674,6 +684,12 @@ const ariaRoles = {
nameFromContent: true,
childrenPresentational: true
},
suggestion: {
type: 'structure',
requiredOwned: ['insertion', 'deletion'],
superclassRole: ['section'],
prohibitedAttrs: ['aria-label', 'aria-labelledby']
},
tab: {
type: 'widget',
requiredContext: ['tablist'],
Expand Down
4 changes: 4 additions & 0 deletions test/integration/rules/aria-allowed-attr/failures.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@
aria-orientation="horizontal"
id="fail30"
></audio>
<div role="mark" aria-label="value" id="fail31">fail</div>
<div role="mark" aria-labelledby="value" id="fail32">fail</div>
<div role="suggestion" aria-label="value" id="fail33">fail</div>
<div role="suggestion" aria-labelledby="value" id="fail34">fail</div>
6 changes: 5 additions & 1 deletion test/integration/rules/aria-allowed-attr/failures.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
["#fail27"],
["#fail28"],
["#fail29"],
["#fail30"]
["#fail30"],
["#fail31"],
["#fail32"],
["#fail33"],
["#fail34"]
]
}
10 changes: 10 additions & 0 deletions test/integration/rules/aria-allowed-attr/passes.html
Original file line number Diff line number Diff line change
Expand Up @@ -1941,3 +1941,13 @@
</tr>
</tbody>
</table>

<div
id="pass91"
role="comment"
aria-level="1"
aria-posinset="1"
aria-setsize="16"
>
ok
</div>
3 changes: 2 additions & 1 deletion test/integration/rules/aria-allowed-attr/passes.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
["#pass88"],
["#pass89"],
["#pass90"],
["#treegrid"]
["#treegrid"],
["#pass91"]
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,10 @@
<li role="menuitem" id="ignore14">>Trash</li>
</ul>
</div>

<div role="suggestion" id="pass8">
<span role="deletion">option</span>
<span role="insertion">option</span>
</div>

<div role="suggestion" id="fail8"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
["#fail4"],
["#fail5"],
["#fail6"],
["#fail7"]
["#fail7"],
["#fail8"]
],
"passes": [
["#pass1"],
Expand All @@ -17,7 +18,8 @@
["#pass4"],
["#pass5"],
["#pass6"],
["#pass7"]
["#pass7"],
["#pass8"]
],
"incomplete": [
["#incomplete1"],
Expand Down
3 changes: 3 additions & 0 deletions test/integration/rules/aria-roles/aria-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
<div role="graphics-document" id="pass111">ok</div>
<div role="graphics-object" id="pass112">ok</div>
<div role="graphics-symbol" id="pass113">ok</div>
<div role="comment" id="pass114">ok</div>
<div role="mark" id="pass115">ok</div>
<div role="suggestion" id="pass116">ok</div>
</div>
<div id="violation">
<!-- abstract roles -->
Expand Down
5 changes: 4 additions & 1 deletion test/integration/rules/aria-roles/aria-roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
["#pass110"],
["#pass111"],
["#pass112"],
["#pass113"]
["#pass113"],
["#pass114"],
["#pass115"],
["#pass116"]
]
}

0 comments on commit 6e389a1

Please sign in to comment.