Commit 7316baf
committed
fix(require-input-label): don't count id as a label alongside aria-label/labelledby
Refs: ember-template-lint/ember-template-lint#3388
id alone cannot be verified statically as a <label for> reference (same
rationale as vuejs-accessibility form-control-has-label). Counting it as
a second label when aria-label or aria-labelledby is already present causes
a false positive multipleLabels error. Keep the bail-out for id-only inputs
(no real labels present) to avoid flagging inputs that likely have an
off-screen <label for> sibling.1 parent 92b2c15 commit 7316baf
2 files changed
Lines changed: 5 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | 163 | | |
165 | 164 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
| |||
177 | 173 | | |
178 | 174 | | |
179 | 175 | | |
180 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 72 | | |
80 | 73 | | |
81 | 74 | | |
| |||
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 103 | | |
116 | 104 | | |
117 | 105 | | |
| |||
271 | 259 | | |
272 | 260 | | |
273 | 261 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | 262 | | |
280 | 263 | | |
281 | 264 | | |
| |||
0 commit comments