Skip to content

bug(checkbox): mat-checkbox renders empty <label> when no label is provided #33230

@nileshlad09

Description

@nileshlad09

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

14.2.7

Description

When a Material checkbox is created without a label, Angular Material still inserts an empty element into the DOM.
This is hidden with display:none, which causes accessibility tools (e.g., Arc Toolkit) to flag it as a violation.

Reproduction

  1. Render a Material checkbox without a label in an Angular 19 app.
  2. Inspect the DOM - note the empty element.
  3. Run Arc Toolkit (chrome extension).
  4. The hidden label is flagged as a violation.

Expected Behavior

If no label is provided, no element should be rendered.

Actual Behavior

Image

An empty element is present in the DOM even when no label is specified.

Environment

  • Angular: 19
  • CDK/Material: 19.2.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityThis issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/checkboxgemini-triagedLabel noting that an issue has been triaged by gemini

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions