forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent
a11y_label_has_associated_control
false positive for c…
…omponent in `<label>` (sveltejs#12119) * fix: prevent `a11y_label_has_associated_control` false positive for component in `<label>` * fix render tags as well * Update .changeset/swift-rats-sing.md --------- Co-authored-by: Rich Harris <[email protected]> Co-authored-by: Rich Harris <[email protected]>
- Loading branch information
1 parent
965c12f
commit 5b60a0e
Showing
5 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"svelte": patch | ||
--- | ||
|
||
fix: prevent `a11y_label_has_associated_control` false positive for component or render tag in `<label>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/svelte/tests/validator/samples/a11y-label-has-associated-control-2/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
<script> | ||
import Component from './component.svelte' | ||
</script> | ||
|
||
<label> | ||
<slot /> | ||
</label> | ||
|
||
<label> | ||
<Component /> | ||
</label> |
7 changes: 7 additions & 0 deletions
7
packages/svelte/tests/validator/samples/a11y-label-has-associated-control-3/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
import Component from './component.svelte' | ||
</script> | ||
|
||
<label> | ||
{@render x()} | ||
</label> |
1 change: 1 addition & 0 deletions
1
packages/svelte/tests/validator/samples/a11y-label-has-associated-control-3/warnings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |