Improve Keyboard Accessibility
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript
- Área
- accessibility, frontend
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Empieza localizando el renderizado del tooltip y la gestión de focus/blur; después, reproduce cómo el foco del teclado se mueve hacia un tooltip visible. Se considera terminado cuando el tooltip se renderiza junto a su activador y permanece abierto mientras el foco permanezca dentro del componente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
problem
- By default, the tooltip's contents is rendered at the bottom of the DOM, so that it is not practical to use the keyboard to access the contents of the tooltip (e.g, to activate navigation links on a menu). This also makes it difficult for screen reader users to read the contents of the tooltip once it is visible, because it is not next to the triggering element.
- There is an option to display the tooltip when the element gains focus. However, this does not work at all in practice because when keyboard focus moves to an element inside the displayed tooltip, the tooltip closes.
Proposed solution
We're using this library at work, and have implemented the following workaround. If there's interest, I'll be happy to submit an MR.
-
Instead of by default rendering the tooltip contents by appending to the end of the DOM, render it next to the triggering element. We worked around this by providing a node next to the triggering element with
getTooltipContainer. -
Listen for blur events, and only hide the tooltip if the related target is not a child of the component's render tree (i.e, if focus is being moved outside the tooltip). Working around this from outside the library was more complex, because we had to set the
visibleprop explicitly, ensuring that it would react correctly to both keyboard focus and mouse hover events.
- Lenguaje dominante
- TypeScript
- Estrellas
- 944
- Forks
- 199
- Merge medio
- 19 h 1 min
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de react-component/tooltip
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
react-component/tooltip#510 · 1 comentario ·
-
rc-tooltip@6.4.0 arrow style bug Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
react-component/tooltip#499 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
react-component/tooltip#488 · 4 comentarios · 2 reacciones ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
react-component/tooltip#487 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
react-component/tooltip#483 ·
Todos los issues de react-component/tooltip
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
carbon-design-system/ibm-products#9907 ·