angular / angular/components

bug(mat-selection-list): Color attribute on (mat-list-option/mat-icon - matListItemIcon) is ignored on hover.

Aperta
#26,723 8 commenti 1 reazione 0 assegnatari Vedi su GitHub
area: material/icon area: material/list P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

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

A mat-icon, located inside a mat-list-option, that has the matListItemIcon directive and has color="accent" (or other theming), loses its color when hovered.

Example:
```


play_arrow
{{pr.user.login}}
{{pr.title}}

```

### Reproduction

Steps to reproduce:
1. Add `color="accent"` to a mat-selection-list > mat-list-option > mat-icon (matListItemIcon)
2. Hover the icon.
3. Accent color goes away and is replaced by a default color.

### Expected Behavior

I would expect the accent color on mat-icon to stay when it is hovered. If the issue here is that for accessibility, hovered items need to visually identify, the background of the mat-list-option itself is already doing that.

### Actual Behavior

Theme colors are lost when the mat-list-option is hovered

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dall’implementazione di Angular Material mat-selection-list e mat-list-option e dal relativo stile al passaggio del mouse, quindi riproduci il problema usando l’esempio fornito mat-icon matListItemIcon in Angular/Material 15. Traccia quale regola di hover sovrascrive l’attributo color dell’icona e aggiungi o aggiorna il test del componente pertinente, se presente; il lavoro è completato quando il colore di accento rimane visibile durante l’hover.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.