Skip to content

Commit

Permalink
fix(aria-valid-attr-value): more thorough test coverage
Browse files Browse the repository at this point in the history
- messageKey added to unit test
- integration test

Refs: #4363
  • Loading branch information
gaiety-deque committed Apr 23, 2024
1 parent 551ba24 commit a823712
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/checks/aria/valid-attr-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ describe('aria-valid-attr-value', function () {
assert.isUndefined(
validAttrValueCheck.call(checkContext, null, null, vNode)
);
assert.deepEqual(checkContext._data, {
messageKey: 'controlsWithinPopup',
needsReview: 'aria-controls="test"'
});
});

it('should pass on aria-owns and aria-expanded=false when the element is not in the DOM', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,7 @@ <h2>Possible False Positives</h2>
<div role="checkbox" id="incomplete6" aria-checked>I'm not checked</div>
<div role="textbox" id="incomplete7" aria-invalid="">I'm actually valid</div>
<div role="textbox" id="incomplete8" aria-hidden>I'm not really gone</div>
<div id="incomplete9" aria-controls="stuff" aria-haspopup="true">
May have injected html to control dynamically later, who knows!
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
["#incomplete5"],
["#incomplete6"],
["#incomplete7"],
["#incomplete8"]
["#incomplete8"],
["#incomplete9"]
]
}

0 comments on commit a823712

Please sign in to comment.