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
- 平均合併
- 16 小時 53 分鐘
- 30 天內合併 PR
- 14
環境準備
- 沒有 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 天內回覆
-
marketing priority: low
難度 2/5 1-3 小時 新手友好度 55/100
TMHSDigital/Free-Game-Dev-Assets#152 ·
維護者通常 1 天內回覆
-
feature priority: medium
難度 5/5 一週以上 新手友好度 25/100
TMHSDigital/Free-Game-Dev-Assets#144 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
Yomguithereal/mnemonist#247 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 72/100
TheOdinProject/curriculum#31490 ·
維護者通常 1 天內回覆
-
bug require-triage
難度 2/5 1-3 小時 新手友好度 72/100
expressjs/expressjs.com#2549 · 1 個 reaction ·
維護者通常 1 天內回覆
-
Docs: no path for someone who just wants to try Indiekit可能已有人在做 @rmdes 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
getindiekit/indiekit#1028 ·
維護者通常 1 天內回覆