Improve Keyboard Accessibility
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Non sono indicati file, test o punti di ingresso. Inizia individuando il rendering del tooltip e la gestione di focus/blur, quindi riproduci lo spostamento del focus della tastiera all’interno di un tooltip visibile; il lavoro è completato quando il tooltip viene renderizzato accanto al suo trigger e rimane aperto finché il focus resta all’interno del componente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 944
- Fork
- 199
- Merge medio
- 19h 1m
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-component/tooltip
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
react-component/tooltip#510 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
react-component/tooltip#499 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
react-component/tooltip#488 · 4 commenti · 2 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
react-component/tooltip#487 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
react-component/tooltip#483 ·
Tutte le issue di react-component/tooltip
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/inspector#2458 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
carbon-design-system/ibm-products#9907 ·