angular / angular/components

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

オープン
#26,489 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
area: material/slide-toggle P4
主要言語
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

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

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

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

調査の方向性

slide-toggle の概要 URL での挙動を、フォーカスされていないトグルのクリックとそのラベルのクリックで比較して再現する。slide-toggle のフォーカス処理を追跡し、フォーカスされていないトグルをクリックしても視覚的なキーボードフォーカスが維持されることを確認しつつ、既存のラベルの挙動を維持する。

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

評価

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

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

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