Skip to content

Commit

Permalink
fix(region): allow role=alertdialog as region (#2660)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Nov 25, 2020
1 parent f2f1537 commit b928df7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checks/navigation/region.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "region",
"evaluate": "region-evaluate",
"options": {
"regionMatcher": "dialog, [role=dialog], svg, iframe"
"regionMatcher": "dialog, [role=dialog], [role=alertdialog], svg, iframe"
},
"metadata": {
"impact": "moderate",
Expand Down
8 changes: 8 additions & 0 deletions test/checks/navigation/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ describe('region', function() {
assert.isTrue(checkEvaluate.apply(checkContext, checkArgs));
});

it('treats role=alertdialog elements as regions', function() {
var checkArgs = checkSetup(
'<div role="alertdialog" id="target"><p>This is random content.</p></div><div role="main">Content</div>'
);

assert.isTrue(checkEvaluate.apply(checkContext, checkArgs));
});

it('treats svg elements as regions', function() {
var checkArgs = checkSetup(
'<svg id="target"></svg><div role="main">Content</div>'
Expand Down

0 comments on commit b928df7

Please sign in to comment.