Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💅 noLabelWithoutControl should allow labeling button tags #4511

Open
1 task done
MrOxMasTer opened this issue Nov 11, 2024 · 3 comments
Open
1 task done

💅 noLabelWithoutControl should allow labeling button tags #4511

MrOxMasTer opened this issue Nov 11, 2024 · 3 comments
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@MrOxMasTer
Copy link

Environment information

biome: The term 'biome' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Rule name

noLabelWithoutControl

Playground link

https://biomejs.dev/playground/?code=ZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABNAGUAbgB1ACAAPQAgACgAKQAgAD0APgAgAHsACgAgACAALwAvACAAYwBvAG4AcwB0ACAAaQBzAEgAeQBkAHIAYQB0AGUAZAAgAD0AIAB1AHMAZQBIAHkAZAByAGEAdABpAG8AbgBDAG8AbgB0AGUAeAB0ACgAKQA7AAoAIAAgAGMAbwBuAHMAdAAgAGkAcwBEAGUAcwBrAHQAbwBwACAAPQAgAHUAcwBlAE0AZQBkAGkAYQBRAHUAZQByAHkAKAAnACgAbQBpAG4ALQB3AGkAZAB0AGgAOgAgADEANAA0ADAAcAB4ACkAJwApADsACgAgACAAYwBvAG4AcwB0ACAAWwBpAHMATwBwAGUAbgBNAGUAbgB1ACwAIABzAGUAdABJAHMATwBwAGUAbgBNAGUAbgB1AF0AIAA9ACAAdQBzAGUAUQB1AGUAcgB5AFMAdABhAHQAZQAoAAoAIAAgACAAIAAnAGkAcwBPAHAAZQBuAE0AZQBuAHUAJwAsAAoAIAAgACAAIABwAGEAcgBzAGUAQQBzAEIAbwBvAGwAZQBhAG4ALgB3AGkAdABoAEQAZQBmA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BzAHQATQBlAG4AdQAgAGMAbABvAHMAZQBNAGUAbgB1AD0AewBjAGwAbwBzAGUATQBlAG4AdQB9ACAALwA%2BAAoAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAA8AC8AbgBhAHYAPgAKACAAIAAgACAAIAAgACAAIAAgACAAIAAgADwALwBkAGkAdgA%2BAAoAIAAgACAAIAAgACAAIAAgACAAIAA8AC8AZABpAHYAPgAKACAAIAAgACAAIAAgACAAIAA8AC8AZABpAHYAPgAKACAAIAAgACAAIAAgACAAIAA8AGwAYQBiAGUAbAAKACAAIAAgACAAIAAgACAAIAAgACAAaAB0AG0AbABGAG8AcgA9ACIAYgB1AHIAZwBlAHIAIgAKACAAIAAgACAAIAAgACAAIAAgACAAYwBsAGEAcwBzAE4AYQBtAGUAPQAiAGEAYgBzAG8AbAB1AHQAZQAgAHoALQAwACAAcwBpAHoAZQAtAGYAdQBsAGwAIABiAGcALQBiAGwAYQBjAGsALwA1ADAAIABtAGQAOgBoAGkAZABkAGUAbgAiAAoAIAAgACAAIAAgACAAIAAgAC8APgAKACAAIAAgACAAIAAgADwALwBkAGkAdgA%2BAAoAIAAgACAAIAA8AC8APgAKACAAIAApADsACgB9ADsACgA%3D

Expected result

Label should not have been highlighted, as this is not against W3C rules:

image
label works the same way on the button

https://validator.w3.org/nu/#textarea

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@MrOxMasTer MrOxMasTer added the S-Needs triage Status: this issue needs to be triaged label Nov 11, 2024
@MrOxMasTer MrOxMasTer changed the title An incorrectly created rule: The button too 💅noLabelWithoutControl: An incorrectly created rule: The button too Nov 11, 2024
@MrOxMasTer MrOxMasTer changed the title 💅noLabelWithoutControl: An incorrectly created rule: The button too 💅noLabelWithoutControl: An incorrectly created rule: The button too Nov 11, 2024
@dyc3
Copy link
Contributor

dyc3 commented Nov 11, 2024

Could you provide a more minimal repro? There's a lot of code in that playground.

@dyc3
Copy link
Contributor

dyc3 commented Nov 11, 2024

You're right, labeling a button shouldn't cause the rule to trigger.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label

@dyc3 dyc3 added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug good first issue Good for newcomers labels Nov 11, 2024
@github-actions github-actions bot removed the S-Needs triage Status: this issue needs to be triaged label Nov 11, 2024
@dyc3 dyc3 changed the title 💅noLabelWithoutControl: An incorrectly created rule: The button too 💅noLabelWithoutControl should allow labeling button tags Nov 11, 2024
@dyc3 dyc3 changed the title 💅noLabelWithoutControl should allow labeling button tags 💅 noLabelWithoutControl should allow labeling button tags Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants