@@ -38,6 +38,7 @@ const htmlForValid = [
38
38
] ;
39
39
const nestingValid = [
40
40
{ code : '<label>A label<input /></label>' } ,
41
+ { code : '<label>A label<textarea /></label>' } ,
41
42
{ code : '<label><img alt="A label" /><input /></label>' } ,
42
43
{ code : '<label><img aria-label="A label" /><input /></label>' } ,
43
44
{ code : '<label><span>A label<input /></span></label>' } ,
@@ -56,6 +57,7 @@ const bothValid = [
56
57
{ code : '<label htmlFor="js_id"><span><span><span>A label<input /></span></span></span></label>' , options : [ { depth : 4 } ] } ,
57
58
{ code : '<label htmlFor="js_id" aria-label="A label"><input /></label>' } ,
58
59
{ code : '<label htmlFor="js_id" aria-labelledby="A label"><input /></label>' } ,
60
+ { code : '<label htmlFor="js_id" aria-labelledby="A label"><textarea /></label>' } ,
59
61
// Custom label component.
60
62
{ code : '<CustomLabel htmlFor="js_id" aria-label="A label"><input /></CustomLabel>' , options : [ { labelComponents : [ 'CustomLabel' ] } ] } ,
61
63
{ code : '<CustomLabel htmlFor="js_id" label="A label"><input /></CustomLabel>' , options : [ { labelAttributes : [ 'label' ] , labelComponents : [ 'CustomLabel' ] } ] } ,
@@ -80,6 +82,7 @@ const htmlForInvalid = [
80
82
] ;
81
83
const nestingInvalid = [
82
84
{ code : '<label>A label<input /></label>' , errors : [ expectedError ] } ,
85
+ { code : '<label>A label<textarea /></label>' , errors : [ expectedError ] } ,
83
86
{ code : '<label><img alt="A label" /><input /></label>' , errors : [ expectedError ] } ,
84
87
{ code : '<label><img aria-label="A label" /><input /></label>' , errors : [ expectedError ] } ,
85
88
{ code : '<label><span>A label<input /></span></label>' , errors : [ expectedError ] } ,
@@ -97,6 +100,7 @@ const nestingInvalid = [
97
100
const neverValid = [
98
101
{ code : '<label htmlFor="js_id" />' , errors : [ expectedError ] } ,
99
102
{ code : '<label htmlFor="js_id"><input /></label>' , errors : [ expectedError ] } ,
103
+ { code : '<label htmlFor="js_id"><textarea /></label>' , errors : [ expectedError ] } ,
100
104
{ code : '<label></label>' , errors : [ expectedError ] } ,
101
105
{ code : '<label>A label</label>' , errors : [ expectedError ] } ,
102
106
{ code : '<div><label /><input /></div>' , errors : [ expectedError ] } ,
0 commit comments