Accessibility Bug - Duplicate Ids Created When More Than One Instance of the Tabs Is Used on a Page
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- accessibility, frontend
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.
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.
- Lingua principale
- JavaScript
- Stelle
- 3.1k
- Fork
- 455
- Merge medio
- 5h 9m
- PR unite (30g)
- 2
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 reactjs/react-tabs
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
reactjs/react-tabs#584 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
reactjs/react-tabs#581 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
reactjs/react-tabs#571 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
reactjs/react-tabs#525 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
reactjs/react-tabs#521 · 3 commenti ·
Tutte le issue di reactjs/react-tabs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Theme loads third-party resources on every page (jsdelivr web font, cdnjs Font Awesome) – GDPR Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/inspector#2458 · 1 commento ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
carbon-design-system/ibm-products#9907 ·