Skip to content

bug(mat-button): mat-button should be changed to disabled appearance when the parent <fieldset> is disabled #31500

Open
@mrpachara

Description

@mrpachara

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 <fieldset disabled> 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 <fieldset disabled>.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions