Hidden star banner and back to top buttons are in the keyboard tab order on every page
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Leggi gli stili nascosti e visibili in src/components/StarBanner.astro e src/components/BackToTop.astro, confrontandoli con il menu mobile chiuso in src/components/Header.astro. Controlla l’ordine di tabulazione da tastiera prima e dopo che ogni controllo diventa visibile o viene nascosto, e conferma che le dissolvenze continuano a funzionare. Il lavoro è completato quando i controlli nascosti non possono ricevere il focus, i controlli visibili del banner continuano a funzionare e i controlli di accettazione vengono superati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On any page of https://og.codercops.com, Tab past the last footer link ("CODERCOPS"). The next three stops are "Star on GitHub", "Maybe later" and "Close" in the star banner, which isn't on screen, so the focus seems to vanish. On a short page like /preview, the fourth stop is the Back to top button, which is also invisible until you've scrolled 500px. Only then does focus reach the Feedback button.
The banner stays in the tab order even after you've dismissed it for good. And while it's hidden it has aria-hidden="true", so screen reader users can land on controls inside a region that's supposed to be hidden.
Both hide with opacity: 0 and pointer-events: none, which doesn't take anything out of the tab order:
src/components/StarBanner.astro:aria-hidden="true"on line 2, the hidden style on lines 94 to 97, and the visible class on lines 100 to 104src/components/BackToTop.astro: the hidden style on lines 48 to 51, and the visible class on lines 54 to 58
The mobile menu already gets this right: it uses visibility: hidden while it's closed (src/components/Header.astro, lines 277 to 291).
What to do
- Make both unfocusable while they're hidden. The simplest way is CSS: add
visibility: hiddento the hidden state andvisibility: visibleto the visible class, and addvisibilityto thetransitionso the fade out still plays. Toggling theinertattribute together with the class works too. - Keep the banner's
aria-hiddenmatching what's on screen, as it does now. - The back to top script is also part of #161 (scripts that stop working after you follow a link inside the site), so a change that only touches CSS is the easiest to merge alongside it.
Where to look
src/components/StarBanner.astro: the markup (lines 2 to 20),hideBanner(lines 47 to 53), where it's shown (lines 57 to 62) and the styles (lines 83 to 104)src/components/BackToTop.astro:toggle(lines 14 to 20) and the styles (lines 32 to 58)src/components/Header.astro: the closed mobile menu (lines 277 to 291), for comparison
Acceptance criteria
- While the banner is hidden (before it appears, after "Maybe later", or after dismissing it for good), Tab goes from the last footer link to the next control you can see
- Back to top is in the tab order only while it's visible
- When the banner is showing, its three controls can be reached with Tab and still work
- The fade in and out look the same as before
-
npm run check,npm run testandnpm run buildpass - The PR says how you checked the tab order (with the keyboard, or the browser's accessibility tree)
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #169 in the description.
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 4
- Merge medio
- 6h 9m
- PR unite (30g)
- 66
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 codercops/ogcops
-
accessibility bug good first issue hacktoberfest ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue hacktoberfest ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
codercops/ogcops#167 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
An empty `imageUrl=`, `logoUrl=` or `template=` returns an error instead of the defaultForse già presa @Saifjafri212213 l’ha presa 1 giorno fa. Apertabug good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
codercops/ogcops#166 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
codercops/ogcops#164 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codercops/ogcops
Issue simili
-
native
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prime-radiant-inc/evener#4839 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
processone/fluux-messenger#1790 ·
I maintainer di solito rispondono entro 1 giorno
-
🛣️ Infrastructure
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
opencrvs/opencrvs-core#14232 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kunchenguid/gh-axi#220 ·
I maintainer di solito rispondono entro 1 giorno