Tab: render endContent beside the tab button, not inside it
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- html, typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Read the Tab component and its existing tests to see how it renders the button or navigation link and handles endContent. Add or update tests for sibling rendering, selection behavior, accessible naming and description, and keyboard navigation. Done means interactive end content is outside the tab control, the described behaviors pass, and there is no axe nested-interactive violation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Astryx Tab renders label and endContent both inside its <button role="tab"> (or <a> in the navigation pattern). A trailing interactive control — the usual case is an IconWithTooltip explaining the tab — therefore nests a <button> inside the tab's <button>:
In HTML, <button> cannot be a descendant of <button>.
This breaks the HTML button content model (no interactive content descendant) and ARIA's children presentational rule for tab. IconWithTooltip focusable={false} avoids the nesting but the tooltip no longer opens inside a tab, and anchoring the tooltip to the tab itself loses it on touch (a tap selects the tab).
Expected
Tab renders endContent itself as a sibling of the tab's button/link, inside a non-interactive wrapper — no new prop:
<span class="…tab wrapper…">
<button role="tab" aria-describedby="<end content id>">{label}</button>
<span id="<end content id>">{endContent}</span>
</span>
- A tab without
endContentkeeps Astryx's markup. - Clicking non-interactive end content (a count badge) still selects the tab; clicking an interactive control in it (e.g.
IconWithTooltip's trigger) does not. - End content leaves the tab's accessible name and is read as its description (
aria-describedby). - The tab's hover background, selection indicator and hit area read as one tab with the end content.
- Arrow-key navigation between tabs is unchanged; an interactive control in the end content is a separate Tab stop.
- No axe
nested-interactiveviolation. Underrole="tablist"an interactive control beside a tab still tripsaria-required-children(a tablist owns only tabs).
Consumer
lablup/backend.ai-webui#10636 — tab help icons in ResourceGroupDetailDrawer and the scheduler page.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 0
- Merge medio
- 1g 1h
- PR unite (30g)
- 36
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 lablup/ui-common
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di lablup/ui-common
Issue simili
-
Add: ESP 2 ROApertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't applyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
wso2/integration-control-plane#1118 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
UTDNebula/utd-notebook#311 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno