Accessibility Bug - Duplicate Ids Created When More Than One Instance of the Tabs Is Used on a Page
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 3.1k
- Fork
- 455
- Merge medio
- 5h 9m
- PR unite (30g)
- 2
Descrizione
This is an accessibility bug caused by the same id being used multiple times in the DOM. What react-tabs does to cause this bug is it autogenerates ids for the tabs it renders to the page. The ids start at 0, and are incremented for each tab and tab-panel rendered. This wouldn’t be a problem if the control is only used once, but when it's used more than once in your project, the separate instances of the control do not know about each other and so the ids for each instance of the control start at 0 and get incremented in the same way, causing id overlap. Ways this issue could be resolved: use random ids, require an instance of the tabs control to be given an id and use that id in the ids of the autogenerated ids for the tabs and tab panels.
By the way, I have made sure that I am using the most up to date version of react-tabs as of the time of writing this, 3.1.0.
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.
Direzione di ricerca
Inizia riproducendo il problema con due istanze del controllo react-tabs in una pagina e ispezionando nel DOM gli ID generati delle tab e dei pannelli delle tab. Confronta gli ID duplicati e le relative associazioni, quindi considera gli approcci proposti nell’issue; il lavoro è completato quando più istanze hanno ID univoci e rimangono correttamente collegate per l’accessibilità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- accessibility, frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100