Commit c461e9a
committed
Fix template-no-duplicate-landmark-elements false positive on dynamic aria-label
When a landmark has a dynamic aria-label or aria-labelledby (e.g.
`<form aria-label={{t 'General settings'}}>`), the port still registered
it under a synthetic unique key. That caused sibling unlabeled landmarks
to be reported as duplicates, because checkDuplicates treated the
unlabeled one as "unlabeled among labeled".
Upstream ember-template-lint skips registration entirely when the label
is not a TextNode, since whether it duplicates a sibling cannot be
statically inferred. Match that behavior.1 parent b705850 commit c461e9a
File tree
2 files changed
+15
-0
lines changed- lib/rules
- tests/lib/rules
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
0 commit comments