Skip to content

Commit a910d83

Browse files
simPodljharb
authored andcommitted
[Tests] label-has-associated-control: add test for <div><label /><input /></div>
1 parent 573d39e commit a910d83

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

__tests__/src/rules/label-has-associated-control-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const htmlForValid = [
3030
{ code: '<label htmlFor="js_id"><span><span><span>A label</span></span></span></label>', options: [{ depth: 4 }] },
3131
{ code: '<label htmlFor="js_id" aria-label="A label" />' },
3232
{ code: '<label htmlFor="js_id" aria-labelledby="A label" />' },
33+
{ code: '<div><label htmlFor="js_id">A label</label><input id="js_id" /></div>' },
3334
// Custom label component.
3435
{ code: '<CustomLabel htmlFor="js_id" aria-label="A label" />', options: [{ labelComponents: ['CustomLabel'] }] },
3536
{ code: '<CustomLabel htmlFor="js_id" label="A label" />', options: [{ labelAttributes: ['label'], labelComponents: ['CustomLabel'] }] },

0 commit comments

Comments
 (0)