angular / angular/components

bug(mat-hint & mat-error): Font scaling breaks layout of mat-hint and validation messages

Open
#31,368 1 comment 0 reactions 0 assignees View on GitHub
Accessibility area: material/form-field P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### 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

When font scaling is increased (e.g. via browser/system settings), `mat-hint` and validation messages (`mat-error`) for input fields overflow into the next content block, breaking layout and readability.

Image

### Reproduction

StackBlitz link: https://stackblitz.com/edit/vjrf1ddz?file=src%2Fexample%2Fform-field-appearance-example.html
Steps to reproduce:
1. Increase font size in browser settings to very big.
2. Observe how hint and error messages overlap or push into adjacent content.

### Expected Behavior

- Hint and error messages should remain visually associated with their input fields.
- Layout should adapt to font scaling without breaking structure.

### Actual Behavior

- Text overflows or overlaps with unrelated content.
- Layout becomes confusing or unreadable.

### Environment

- Angular: 20.0.3
- CDK/Material: 20.0.3
- Browser(s): Microsoft Edge, Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Contributor guide

Open the contributing guide

Research direction

Start with the StackBlitz reproduction at src/example/form-field-appearance-example.html and reproduce the issue using a very large browser font size in Chrome or Edge. Trace the mat-hint and mat-error layout around the input fields; done means their text stays associated with the fields without overlapping adjacent content or becoming unreadable.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.