Hidden star banner and back to top buttons are in the keyboard tab order on every page
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 86/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读src/components/StarBanner.astro和src/components/BackToTop.astro中的隐藏和可见样式,并与src/components/Header.astro中关闭状态的移动菜单进行比较。检查每个控件变为可见或被隐藏前后的键盘 Tab 顺序,并确认淡入淡出效果仍然有效。完成标准是:隐藏的控件无法获得焦点,可见横幅中的控件仍能正常工作,并且验收检查通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 8
- 派生
- 4
- 平均合并
- 8 小时 13 分钟
- 30 天内合并 PR
- 121
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/ogcops 的其他 Issue
-
Add the Live Recording podcast template (`podcast-live-recording`)可能已有人在做 @Ravindar-Amogh-Gummadavelly 于 1 天前认领。 未关闭good first issue hacktoberfest templates
codercops/ogcops#261 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add the Waitlist product template (`product-waitlist`)可能已有人在做 @sank8-2 于 1 天前认领。 未关闭good first issue hacktoberfest templates
codercops/ogcops#257 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
hacktoberfest
难度 1/5 1 小时以内 新手友好度 35/100
维护者通常 1 天内回复
-
feature good first issue hacktoberfest templates
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
area:agents area:cost bug platform:macos
难度 2/5 1-3 小时 新手友好度 77/100
anthropics/claude-code#105375 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
-
难度 2/5 1-3 小时 新手友好度 79/100
galaxyproject/loom#616 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 条评论 ·
维护者通常 1 天内回复