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

[label-has-associated-control] ids in the for attribute are not checked for existence #1759

Open
air2 opened this issue Apr 12, 2024 · 0 comments
Labels
package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@air2
Copy link

air2 commented Apr 12, 2024

The following code should error, but does not:

<label for="id">Label</label>
<input id="otherId" />

{
  "rules": {
    "@angular-eslint/template/label-has-associated-control": ["error"]
  }
}
<label for="id">Label</label>
<input id="otherId" />

Versions

package version
@angular-eslint/eslint-plugin-template 17.3.0
@angular-eslint/template-parser 17.3.0
@typescript-eslint/parser 7.4.0
ESLint 8.57.0
node 18.19.0
# Please run `npx ng version` in your project and paste the full output here:
Angular: 17.3.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.3
@angular-devkit/build-angular   17.3.3
@angular-devkit/core            17.3.3
@angular-devkit/schematics      17.3.3
@schematics/angular             17.3.3
rxjs                            7.8.1
typescript                      5.4.3
zone.js                         0.14.4
  • [X ] I have tried restarting my IDE and the issue persists.
  • [ X] I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.
@air2 air2 added package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer labels Apr 12, 2024
@air2 air2 changed the title [accessibility-label-has-associated-control] ids in the for attribute are not checked for existence [label-has-associated-control] ids in the for attribute are not checked for existence Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant