a11y: shortlist drops focus to body on Clear and last Remove, and adding an item gives no in-view feedback
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 1-2 天
- 新手友好度
- 57/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Start with site/public/shortlist.js, especially lines 117 and 124, and inspect renderPanel() plus the existing polite live region and sticky controls. Reproduce Clear and last Remove to check focus, then add an item from a lower visible card to observe feedback and layout movement. Done means focus stays off body, additions announce and show the count in view, and adding causes no layout shift without scroll anchoring.
由索引模型根据 Issue 内容生成。
描述
Why it matters
Keyboard and screen-reader users lose their place twice (focus lands on <body>), and every user who stars a card deep in the list gets no visible confirmation beyond the button label change, because the panel appears above the grid, often screens away. In browsers without scroll anchoring (WebKit) the list also jumps under the thumb.
Evidence (at 69387df, local build)
- Click "Clear shortlist" ->
document.activeElement === document.body. Add one, click "Remove" ->body.site/public/shortlist.js:117focuses#shortlist, whichrenderPanel()has just sethidden; line 124update([])hides the panel containing the focused button. - Adding from the 4th visible card at 375 px: the panel is inserted about 360 px above the card with a height of 310 px; Chrome's scroll anchoring compensated, Safari has none. The only feedback is the button text "On shortlist".
Suggested approach
When the panel hides, focus #search or #result-count; announce "Added to shortlist (N)" / "Removed ..." through the existing polite live region; show a persistent "Shortlist (N)" control in the sticky controls (or on the floating to-top button) that scrolls to and focuses the panel. Rendering the panel as a one-line sticky summary under the controls would also remove the layout jump.
Done when
Focus never lands on <body> after a shortlist action; adding announces and shows a count in view; no layout shift in browsers without scroll anchoring.
- 主要语言
- JavaScript
- 星标
- 58
- 派生
- 15
- 平均合并
- 18 小时 42 分钟
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
community marketing priority: low
难度 2/5 1-3 小时 新手友好度 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
维护者通常 1 天内回复
-
documentation priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#72 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1-3 小时 新手友好度 68/100
TMHSDigital/Free-Game-Dev-Assets#3 · 1 条评论 ·
维护者通常 1 天内回复
-
correction
难度 2/5 1-3 小时 新手友好度 57/100
TMHSDigital/Free-Game-Dev-Assets#162 ·
维护者通常 1 天内回复
-
marketing priority: low
难度 2/5 1-3 小时 新手友好度 55/100
TMHSDigital/Free-Game-Dev-Assets#152 ·
维护者通常 1 天内回复
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
espressif/esp-vision#18 ·
-
verified
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复