Focus trap focuses the wrong radio button if native radio button group is the first element in modal
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez le problème avec un modal dont le premier contenu pouvant recevoir le focus est un groupe natif de boutons radio, puis sortez du modal avec Tab pour déclencher le piège de focus. Suivez le comportement du piège de focus du modal et la gestion du focus du groupe de boutons radio ; le travail est terminé lorsque le focus revient au bouton radio sélectionné plutôt qu’au premier bouton.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- accessibility, frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100