Skip to content

matInput: Sonar is not able to recognize mat-label for matInput #24724

@harpreet86

Description

@harpreet86

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Sonar is giving the error: "Associate a valid label to this input field."

input field contains the matInput attribute and there exists a mat-label but still getting this error.

Reproduction

Steps to reproduce:

  1. Create an html with mat-form-field
  2. Add mat-label inside
  3. Define input element with matInput attribute
  4. Run sonar scanner

Expected Behavior

No such Sonar error should be there if mat-label and matInput exist.

Actual Behavior

Sonar error: "Associate a valid label to this input field."

Environment

  • Angular
  • Material
  • Sonar
  • Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions