From c28564663896dece3e51b1f4b65e3d41eeabe57d Mon Sep 17 00:00:00 2001 From: jesse-ux Date: Fri, 25 Sep 2026 03:48:19 +0800 Subject: [PATCH] fix(test): keep the typewriter contract on its own component The home-surface join pulled the onboarding shell's aria-busy into the typewriter slice. The typewriter file itself still announces the finished line once. --- docs/BUG_HISTORY.md | 2 +- frontend/tests/chat-navigation-a11y-contract.test.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 3c6803e9..601c6df4 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -13756,7 +13756,7 @@ - 触发条件:首页拆分把引导屏 JSX 从 `page.tsx` 搬到 `home-onboarding-shell.tsx` 后推 staging。 - 根因:合同把 ` { }); test("the onboarding typewriter announces the finished line once instead of each character", () => { - const onboardingMessage = sourceBetween(pageSource, "function OnboardingChatMessage(", "function isProfileComplete("); + // 原值: 从拼接后的首页表面切到 isProfileComplete。 + // 新值: 只读打字机组件文件。 + // 原因: 引导屏插进拼接面后带上了评估遮罩的 aria-busy,打字机本身仍不得用 aria-busy。 + const onboardingMessage = readFileSync(new URL("../src/components/onboarding-chat-message.tsx", import.meta.url), "utf8"); // Given: the visibly typed text is hidden from assistive technology. assert.match(onboardingMessage, /className=\{`onboarding-stream[^`]*`\} aria-hidden="true"/);