Is this a regression?
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
- Render a Material checkbox without a label in an Angular 19 app.
- Inspect the DOM - note the empty element.
- Run Arc Toolkit (chrome extension).
- The hidden label is flagged as a violation.
Expected Behavior
If no label is provided, no element should be rendered.
Actual Behavior
An empty element is present in the DOM even when no label is specified.
Environment
- Angular: 19
- CDK/Material: 19.2.19
Is this a regression?
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
Expected Behavior
If no label is provided, no element should be rendered.
Actual Behavior
An empty element is present in the DOM even when no label is specified.
Environment