bug(mat-label): mat-label overlap control and does not show ellipsis
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
I'm not 100% sure, but it worked before
### Description
The `mat-label` does not wrap the text with ellipsis anymore in the `mat-datepicker`. Instead the text goes over the icon/control itself.

```
To long to show all text
```
### Reproduction
Steps to reproduce:
1. Simple add create a mat-datepicker with a mat-label with new version 15.x
[Stackblitz](https://stackblitz.com/edit/angular-cv9udr-pxxmf6?file=src/app/datepicker-overview-example.ts) is available
### Expected Behavior
Before the text was trimmed with ellipsis like this:

### Actual Behavior
Now is go outside the control/over the icon:

### Environment
- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): (Chrome, Edge, Firefox)
- Operating System: MacOS
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and compare the Angular 15 mat-datepicker and mat-form-field label behavior with the previous version. Trace how the mat-label is rendered beside the datepicker toggle, then verify that a long label is ellipsized without overlapping the control and add regression coverage for the reproduced case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100