feat(复习出口): 40 课答题结果新增可键盘操作的复习出口 - #69
Merged
Merged
Conversation
此前「复习出口」只是文档承诺:答错后只列出未达成的目标,学习者无法一键回到讲这条 目标的任务页。现在每课答题结果按未达成目标去重生成原生按钮,点击后回到对应任务面 板并把焦点交给该面板标题,同时用 aria-live 说明去向;未提交、全答对或步骤锁定时不 渲染或原地返回。 - 每课新增 objectiveReviewStep,把学习目标映射到讲它的任务面板 - 静态契约:退出入口无 tabindex、按钮为原生 button、有 focus-visible 样式 - s1-01 驱动与 flow 驱动量到真实点击后的面板、焦点与提示条 - 每课 flow 检查 19→20(39 课共 780 项),文档与验收矩阵同步 - 修正「已审校」措辞漂移:页面与文档统一写「已通过校验」 验证:bun test 794/794;e2e:flow 780/780;e2e:keyboard 328/328; e2e:typed 659/659;e2e:prereq 242/242;e2e:s1-01 88/88;bun run build 通过。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本轮切片
把
docs/roadmap.md(159、175 行)与docs/feature-checklist.md(113 行)里承诺的复习出口从文案变成真功能:此前 40 课答错后只列出「未达成的目标」,学习者拿不到回讲这条目标那条任务的路径。现在每课答题结果里按未达成目标去重,生成每目标一个原生<button>,点击后回到讲这条目标的任务面板,焦点落到该面板标题,并用aria-live说明去向。变更
objectiveReviewStep:把三条学习目标映射到讲它的任务面板(问答驱动的人工核对,40 课逐课确认)。<nav id="quizReviewExit" hidden>,只在提交且未全答对时渲染;未提交/全答对/步骤锁定时不渲染或原地返回。点退出不改变解锁进度(完成度派生,不会因回看而回锁)。tabindex,按钮是原生<button type="button">、不带tabindex,.review-link:focus-visible有 3px 橙色焦点环,所有步骤面板<h2>加tabindex="-1"以承接脚本聚焦。README.md、docs/roadmap.md、docs/feature-checklist.md、AGENTS.md里描述题库来源的「已审校/经审校」统一为已通过校验(与 S5-08 页面文案一致;README 的「仍待人工审校」原为陈旧文案)。禁止宣称「人工审校」的规则保持不变。TDD 与验证
tests/objective-binding.test.ts(+sourceBlock()花括号配平提取器、3 个用例:退出入口位次与目标映射绑定、点击真的调用selectStep并聚焦目标标题、每个面板<h2>可编程聚焦)、tests/keyboard-access-contract.test.ts(+1 个用例:容器与按钮无tabindex、按钮原生、有 focus-visible 规则)。tests/e2e/s1-01-cdp.ts把原来只查「存在#newQuizButton」的假复习出口检查换成真实点击测量(提交前后可见性、按页面自身objectiveReviewStep校验按钮与目标一一对应、面板切换、焦点命中标题、进入后输入框仍锁、可返回答题);tests/e2e/flow-cdp.ts增加同样的每课检查,checksPerLesson19→20。tests/storage-recovery.test.ts的桩 DOM 以无参数调用点击监听器,新处理器原来直接读event.target会抛TypeError→ 改为event?.target?.closest?.(...)可选链保护(40 个失败归零)。bun testbun run e2e:flowbun run e2e:keyboardbun run e2e:typedbun run e2e:prereqbun run e2e:s1-01bun run build文档同步由
tests/e2e-count-facts.test.ts(18/18)强制绑定:README、docs/roadmap.md、docs/feature-checklist.md、tests/e2e/manual-checklist.md、tests/e2e/flow-manual-checklist.md、tests/e2e/s1-01-manual-checklist.md及 39 份每课清单已更新为 20 项 / 780 项。题库来源与
awaiting-user-review标记未改动:题目仍来自各课course-plan(自编),lesson.json状态不变,未新增或改写任何题目、未声称人工审校。