From ad73e5647675c63fa304295448e690e2926ef70b Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 1 Nov 2026 22:58:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(presentation):=20=EC=98=88=EC=A0=9C=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9D=B4=20=EC=9E=90=EA=B8=B0=20=EC=96=B8?= =?UTF-8?q?=EC=96=B4=EB=A5=BC=20ko-KR=EB=A1=9C=20=EB=B0=9D=ED=9E=8C?= =?UTF-8?q?=EB=8B=A4=20(08-07)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: LocaleProvider가 을 선택한 locale로 바꾸는데, 예제 화면 4개는 의도적으로 catalog 밖이라 본문이 한국어 literal이다. en-US로 바꾸면 /examples/platform main의 한글 1,013자가 lang="en-US" 아래에 있어 스크린 리더가 영어 규칙으로 읽는다(WCAG 3.1.2). 고른 방법: 리뷰 대안 (B). 예제 화면 루트 section에 lang="ko-KR"을 준다. 예제를 catalog 밖에 둔 결정(VD-06, check-i18n 예외)은 그대로다. 버린 대안: (C) 예제 문구 번역 — 문구 수백 개이고 지울 수 있는 예제다. 예제 안에 중첩 LocaleProvider(ko-KR) — 을 전역으로 바꾼다. 위험·한계: 예제 안에서 디자인 시스템 컴포넌트가 catalog로 그리는 문구(접근 상태 화면, 오류 문구, 닫기 같은 접근성 이름)는 en-US에서 영어인데 ko-KR 구역 안에 놓인다. 화면 상태 갤러리에 몇 줄 있다. 한국어 본문 전체가 영어 규칙으로 읽히던 것보다 범위가 훨씬 작아 받아들였다. 예제를 번역하기로 하면 (C)로 간다. 눈에 보이는 화면 변화는 없다. 검증: - RED: i18n.spec.ts 새 테스트가 수정 전 chromium에서 실패 (Platform composition: lang Expected "ko-KR", Received ""). - GREEN: i18n·accessibility·ui-gallery·platform-overview e2e chromium·firefox·webkit 69/69 통과. tests/component 220/220, check-i18n PASS, tsc app 통과, eslint 통과. Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-07 --- .../examples/auth-example-page.tsx | 3 ++- .../examples/platform-overview-page.tsx | 3 ++- .../examples/state-gallery-page.tsx | 3 ++- src/presentation/examples/ui-gallery-page.tsx | 3 ++- tests/e2e/i18n.spec.ts | 27 +++++++++++++++++++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/presentation/examples/auth-example-page.tsx b/src/presentation/examples/auth-example-page.tsx index a21c5e3c..f8419f2e 100644 --- a/src/presentation/examples/auth-example-page.tsx +++ b/src/presentation/examples/auth-example-page.tsx @@ -9,7 +9,8 @@ export default function AuthExamplePage() { const { pending, failed, run } = useSessionAction(); return ( -
+ // 08-07. Example copy is Korean in every locale (outside the catalog). +
+ // 08-07. Example copy is Korean in every locale (outside the catalog). +
+ // 08-07. Example copy is Korean in every locale (outside the catalog). +
+ // 08-07. Example copy is Korean in every locale (outside the catalog). +
{ + await page.setViewportSize({ width: 1280, height: 800 }); + await page.goto("/"); + await page.getByRole("combobox", { name: "언어" }).selectOption("en-US"); + await expect(page.locator("html")).toHaveAttribute("lang", "en-US"); + const navigation = page.getByRole("navigation", { name: "Primary navigation" }); + + for (const label of [ + "Platform composition", + "UI components", + "Screen states", + "Authentication", + ]) { + await navigation.getByRole("link", { name: label }).click(); + await expect(page).toHaveTitle(new RegExp(`^${label} `)); + await expect(page.locator("main .ui-page").first(), label).toHaveAttribute( + "lang", + "ko-KR", + ); + } +}); + test("applies RTL to the shell and modal navigation without changing action semantics", async ({ page, }) => {