Focus trap focuses the wrong radio button if native radio button group is the first element in modal
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
If the first focus-able element in a modal is a group of (native element, **not** Material) radio buttons, and one tabs off the end of the modal (triggering the focus trap and returning the focus to the top of the modal), the first radio button is always focused, even if the selected radio button is one of the later ones.
The expected behavior—found when tabbing to a group of radio buttons in other cases—is for focus to go to the selected radio button.
For now, our workaround is just to ensure there is always some other focus-able element at the top of the modal. A close button works well for this.
I could not find any issues relating to this.
Beitragsleitfaden
Rechercherichtung
Reproduziere das Problem mit einem Modal, dessen erster fokussierbarer Inhalt eine native Radio-Button-Gruppe ist, und tabbe dann aus dem Modal heraus, um den Focus-Trap auszulösen. Verfolge das Focus-Trap-Verhalten des Modals und die Fokusbehandlung der Radio-Gruppe; fertig ist die Aufgabe, wenn der Fokus zum ausgewählten Radio-Button statt zum ersten Button zurückkehrt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- accessibility, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100