From 5008013db24f006498ce9437c4ad859e062ab09a Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sun, 1 Nov 2026 18:34:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(design-system):=20=ED=91=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=98=81=EC=97=AD=EC=97=90=20=ED=91=9C=20?= =?UTF-8?q?=EC=A0=9C=EB=AA=A9=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=84=20=EB=B6=99=EC=9D=B8=EB=8B=A4=20(UI-08)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 표를 감싼 스크롤 영역이 키보드 포커스(tabIndex 0)를 받지만 역할과 이름이 없었다. 스크린 리더가 이름 없는 정지점으로 읽었다. 영역에 role="region"을 주고 caption을 aria-labelledby로 연결했다. 위험: 없음. 시각 변화가 없다. 검증: 이름 있는 region을 요구하는 컴포넌트 테스트가 고치기 전 실패했고, 고친 뒤 통과했다(design-system-platform.test.tsx 10/10). --- .../design-system/patterns/common-patterns.tsx | 10 ++++++++-- tests/component/design-system-platform.test.tsx | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/presentation/design-system/patterns/common-patterns.tsx b/src/presentation/design-system/patterns/common-patterns.tsx index e37e1e91..c9843dce 100644 --- a/src/presentation/design-system/patterns/common-patterns.tsx +++ b/src/presentation/design-system/patterns/common-patterns.tsx @@ -27,11 +27,17 @@ export function DataTable({ rowKey(row: Row): string; empty: React.ReactNode; }>) { + const captionId = useId(); if (rows.length === 0) return <>{empty}; return ( -
+
- + {columns.map((column) => ( diff --git a/tests/component/design-system-platform.test.tsx b/tests/component/design-system-platform.test.tsx index 7a228c8e..ef11d35c 100644 --- a/tests/component/design-system-platform.test.tsx +++ b/tests/component/design-system-platform.test.tsx @@ -326,6 +326,12 @@ describe("design-system platform interactions", () => { expect(screen.getByRole("table", { name: "결과" })).toHaveTextContent( "첫 항목", ); + // UI-08: the keyboard-scrollable wrapper is a named region, not an + // anonymous focus stop. + expect(screen.getByRole("region", { name: "결과" })).toHaveAttribute( + "tabindex", + "0", + ); await user.click(screen.getByRole("link", { name: "2페이지" })); expect(onPage).toHaveBeenCalledWith(2); });
{caption}{caption}