bug(mat-button): mat-button should be changed to disabled appearance when the parent `<fieldset>` is disabled
- 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
The same issue #3033 was closed by angular/angular#35309. But it only fixes form controls not buttons.
The CSS selector for disabled appearance only selects `[disabled]` but it should also select `:disabled` to make the parent `` work.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-starter-ck6fmjkd
Steps to reproduce:
1. Put both `mat-button` and **disabled**-`mat-button` in ``.
### Expected Behavior
Both `mat-button` should show the same appearance.
### Actual Behavior
They are different.
### Environment
- Angular: 20.0.6
- CDK/Material: 20.0.5
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Contributor guide
Research direction
Start with the mat-button disabled-appearance styles and the CSS selector that currently checks only [disabled]. Reproduce the issue using the linked StackBlitz with buttons inside ; done means both buttons have the same disabled appearance, including the explicitly disabled button case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100