Skip to content

Commit

Permalink
[Tests] label-has-associated-control: add test for <div><label /><i…
Browse files Browse the repository at this point in the history
…nput /></div>
  • Loading branch information
simPod authored and ljharb committed May 15, 2020
1 parent 573d39e commit a910d83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/src/rules/label-has-associated-control-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const htmlForValid = [
{ code: '<label htmlFor="js_id"><span><span><span>A label</span></span></span></label>', options: [{ depth: 4 }] },
{ code: '<label htmlFor="js_id" aria-label="A label" />' },
{ code: '<label htmlFor="js_id" aria-labelledby="A label" />' },
{ code: '<div><label htmlFor="js_id">A label</label><input id="js_id" /></div>' },
// Custom label component.
{ code: '<CustomLabel htmlFor="js_id" aria-label="A label" />', options: [{ labelComponents: ['CustomLabel'] }] },
{ code: '<CustomLabel htmlFor="js_id" label="A label" />', options: [{ labelAttributes: ['label'], labelComponents: ['CustomLabel'] }] },
Expand Down

0 comments on commit a910d83

Please sign in to comment.