angular / angular/components

Focus trap focuses the wrong radio button if native radio button group is the first element in modal

Abierto
#22,878 1 comentario 0 reacciones 0 asignados Ver en GitHub
area: cdk/a11y P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce el problema con un modal cuyo primer contenido enfocable es un grupo nativo de botones de opción y, después, sal del modal con Tab para activar la trampa de foco. Sigue el comportamiento de la trampa de foco del modal y la gestión del foco del grupo de botones de opción; el trabajo estará terminado cuando el foco vuelva al botón de opción seleccionado en lugar de al primer botón.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
accessibility, frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.