angular / angular/components

bug(mat-checkbox): Wrong appearance when inside a disabled fieldset

オープン
#27,223 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/checkbox P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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 material checkbox is not styled correctly when inside a disabled [fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset).

The appearance should be the same as when outside a fieldset:
![image](https://github.com/angular/components/assets/24881789/3e6f44db-799b-42e0-835f-f5c788b3b9fa)

### Reproduction

StackBlitz link:
Steps to reproduce:
1. https://stackblitz.com/edit/components-issue-penyki

### Expected Behavior

1. When checked, a grey background within the tick box
2. The font color is light gray
3. Not clickable (disabled)

### Actual Behavior

1. When checked, no background within the tick box
2. The font color is black
3. Clickable. Possible to change checked state.

### Environment

- Angular: 16.0.0
- CDK/Material: 16.0.3
- Browser(s): Chrome, Firefox, Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされている StackBlitz の再現から始め、Chrome、Firefox、Edge で、無効化された fieldset の内側と外側にある checkbox の動作を比較します。完了条件は、チェックされた checkbox の背景が灰色で、テキストが薄い灰色になり、fieldset が無効化されているときに checkbox の状態を変更できないことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。