angular / angular/components

bug(slide-toggle): no remaining focus if clicked on non active toggle

Aperta
#26,489 1 commento 1 reazione 0 assegnatari Vedi su GitHub
area: material/slide-toggle P4
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

if a non focused toggle is clicked, there is no remaining focus - bad if keyboard control is used afterwards.
However if the label is clicked instead, the remaining focus works.
![toggle-focus](https://user-images.githubusercontent.com/27373333/214414034-91364c13-cf8f-4130-843d-a09f6f17f40a.gif)

### Reproduction

Steps to reproduce:
1. https://material.angular.io/components/slide-toggle/overview
2. click on not focused toggle vs click on not focused label

### Expected Behavior

remaining focus should appear on click on a non focused toggle

### Actual Behavior

no remaining focus on click on a not already focused toggle

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il comportamento all’URL della panoramica di slide-toggle confrontando un clic su un toggle non focalizzato con un clic sulla relativa etichetta. Traccia la gestione del focus di slide-toggle e verifica che fare clic su un toggle non focalizzato mantenga il focus da tastiera visibile, preservando al contempo il comportamento esistente dell’etichetta.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.