test(a11y): 접근성 자동 검사가 지키는 규칙에 실제로 닿게 한다
frontend-quality-gates / merge / static checks (pull_request) Successful in 3m52s
frontend-quality-gates / merge / tests (pull_request) Failing after 15m28s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 10m56s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / checker self-tests (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / merge / static checks (pull_request) Successful in 3m52s
frontend-quality-gates / merge / tests (pull_request) Failing after 15m28s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 10m56s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / checker self-tests (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
접근성 자동 검사 셋이 지키는 것에 닿지 않는다. - reduced-motion e2e가 body의 animationDuration으로 브라우저 기본값 0s도 받아들인다. responsive.css의 reduced-motion 규칙을 지워도 통과한다(1112/05-08). - 예제 화면을 Storybook 갤러리로 옮기면서 화면 전체 axe 검사가 빠졌다. 기능이 없는 템플릿에서 빈·오류·로그인·권한 표면이 axe를 받지 않는다(05-04). - 제품이 WCAG 2.2 AA를 약속하는데 스캔 태그는 2.1까지다. 같은 태그 목록이 네 곳에 손으로 적혀 있다(05-05 일부). - 셸 compact drawer는 modal이고 모든 셸 route에 있는데, 라우트 수동 기록 셋과 checklist 예시가 M4를 "modal 없음"으로 채운다(05-07). 고른 방법: reduced-motion 시험은 규칙이 없을 때의 값(0s)과 규칙의 값 (0.01ms)을 함께 본다. 갤러리 두 story를 light·dark에서 화면 전체 axe로 본다. 태그는 tests/support/browser/axe-tags.ts 하나에 두고 wcag22aa를 더한다. 라우트 기록의 M4를 pending으로 바꾸고 checklist에 셸 drawer를 적는다. 수동 기록 양식에 2.4.11·2.5.8 칸을 더하는 일(05-05의 나머지)은 양식과 생성 출력이 바뀌는 일이라 이 커밋에 넣지 않았다. R9-D9(권하는 안으로 정함 (2026-11-12, 총괄))에 따라 따로 한다. 위험·한계: wcag22aa는 axe의 target-size 규칙만 더한다. 포커스 가림(2.4.11) 같은 기준은 여전히 수동이다. 검증: reduced-motion 시험이 규칙을 지운 변이에서 실패하고 원래 코드에서 통과한다. 갤러리 axe 넷과 FE-GATE-009는 desktop에서 돈다(PR 본문). Refs: 1112/05-04, 1112/05-05, 1112/05-07, 1112/05-08
This commit is contained in:
@@ -23,7 +23,7 @@ paths:
|
||||
|
||||
## 함정
|
||||
|
||||
1. axe 통과를 접근성 완료로 적는다. e2e 스캔의 태그는 `wcag2a`·`wcag2aa`·`wcag21a`·`wcag21aa`뿐이다. WCAG 2.2에서 더해진 기준(포커스가 가려지지 않음, 목표 크기 최소, 드래그 대안 등)은 자동으로 보지 않는다. 그리고 critical·serious 위반만 막는다. — `tests/e2e/accessibility.spec.ts`, `docs/accessibility/manual-checklist.md`, `docs/design/2026-07-26-design-system-platform-design.md` 13절
|
||||
1. axe 통과를 접근성 완료로 적는다. 스캔 태그는 `tests/support/browser/axe-tags.ts` 하나다. WCAG 2.2 AA 태그(`wcag22aa`, 목표 크기 2.5.8)도 돌지만, 2.2에서 더해진 기준 대부분(포커스가 가려지지 않음, 드래그 대안 등)은 axe에 규칙이 없어 자동으로 보지 않는다. 그리고 critical·serious 위반만 막는다. — `tests/e2e/accessibility.spec.ts`, `docs/accessibility/manual-checklist.md`, `docs/design/2026-07-26-design-system-platform-design.md` 13절
|
||||
2. 자동 스캔이 본 상태를 넘겨 짐작한다. 보호 라우트는 데모 로그인 뒤, 목록은 빈 상태, 단건 읽기 상세는 실패 상태에서 스캔하고 `notChecked`로 남긴다. 데이터가 찬 목록·상세는 기능 시험과 수동 검토 몫이다. — `docs/accessibility/manual-checklist.md` 「자동 실행이 검사하는 것」
|
||||
3. 린트가 의미를 잡아 줄 거라 믿는다. `eslint.config.ts`에 접근성 규칙 플러그인이 없다. `div` + 키 핸들러로 만든 버튼, 이름 없는 아이콘 버튼은 component 시험·axe·리뷰가 잡는다. — `eslint.config.ts`, `docs/design/2026-07-26-design-system-platform-design.md` 13절
|
||||
4. 저장 중 버튼을 `disabled`로 바꿔 키보드 포커스를 잃게 한다. `pending`을 쓴다. — `docs/manual/02-decision-tables.md` 6절
|
||||
|
||||
@@ -38,7 +38,7 @@ Attestation: accepted
|
||||
M1 Keyboard: pass
|
||||
M2 Visible focus: pass
|
||||
M3 Route focus: pass
|
||||
M4 Modal focus: not-applicable (no modal on this route)
|
||||
M4 Modal focus: pass
|
||||
M5 Error association: not-applicable (no form error on this route)
|
||||
M6 Color signal: pass
|
||||
M7 Reduced motion: pass
|
||||
@@ -58,7 +58,9 @@ Notes: <observations and linked defect IDs>
|
||||
- Screen reader: 제목, live region, 오류, 동작이 한 번씩 읽힌다
|
||||
|
||||
form이나 dialog가 있는 route는 M4 modal 리뷰와 M5 필드 오류 리뷰를 실제로 해야
|
||||
한다. 그런 route에서는 그 항목을 not-applicable로 표시하면 안 된다. 자동 증거가
|
||||
한다. 그런 route에서는 그 항목을 not-applicable로 표시하면 안 된다. 셸(`AppShell`)의
|
||||
compact 탐색 drawer는 modal이고 셸 아래 모든 route에 있으므로, 셸 route의 M4는
|
||||
not-applicable이 아니다. 자동 증거가
|
||||
통과했다는 것은 이것만 뜻한다: 기록된 Chromium, Firefox, WebKit 실행에서
|
||||
테스트한 페이지에 critical이나 serious 등급의 axe 발견이 없었다.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Attestation: pending
|
||||
M1 Keyboard: pending
|
||||
M2 Visible focus: pending
|
||||
M3 Route focus: pending
|
||||
M4 Modal focus: not-applicable (no modal on this route)
|
||||
M4 Modal focus: pending
|
||||
M5 Error association: not-applicable (no form error on this route)
|
||||
M6 Color signal: pending
|
||||
M7 Reduced motion: pending
|
||||
|
||||
@@ -10,7 +10,7 @@ Attestation: pending
|
||||
M1 Keyboard: pending
|
||||
M2 Visible focus: pending
|
||||
M3 Route focus: pending
|
||||
M4 Modal focus: not-applicable (no modal on this route)
|
||||
M4 Modal focus: pending
|
||||
M5 Error association: not-applicable (no form error on this route)
|
||||
M6 Color signal: pending
|
||||
M7 Reduced motion: pending
|
||||
|
||||
@@ -10,7 +10,7 @@ Attestation: pending
|
||||
M1 Keyboard: pending
|
||||
M2 Visible focus: pending
|
||||
M3 Route focus: pending
|
||||
M4 Modal focus: not-applicable (no modal on this route)
|
||||
M4 Modal focus: pending
|
||||
M5 Error association: not-applicable (no form error on this route)
|
||||
M6 Color signal: pending
|
||||
M7 Reduced motion: pending
|
||||
|
||||
@@ -9,8 +9,9 @@ import {
|
||||
answerInstalledApiRequest,
|
||||
type InstalledApiAnswer,
|
||||
} from "./support/installed-api-answers.ts";
|
||||
import { WCAG_AXE_TAGS } from "../support/browser/axe-tags.ts";
|
||||
|
||||
const WCAG_TAGS = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"];
|
||||
const WCAG_TAGS = [...WCAG_AXE_TAGS];
|
||||
const SIGN_IN_TITLE = KO_MESSAGES["route.auth.required.title"];
|
||||
const CATALOG = KO_MESSAGES as Readonly<Record<string, string>>;
|
||||
|
||||
@@ -127,11 +128,23 @@ test("@a11y skip link moves keyboard focus into main", async ({ page }) => {
|
||||
.toBe(true);
|
||||
});
|
||||
|
||||
// 1112/05-08. The policy is the reduced-motion rule (responsive.css): every
|
||||
// animation and transition becomes 0.01 ms. The browser default is 0s, so the
|
||||
// check reads the rule's own value and compares it with the default, or a
|
||||
// deleted rule passes.
|
||||
test("@a11y reduced-motion policy disables long animation", async ({ page }) => {
|
||||
await page.emulateMedia({ reducedMotion: "reduce" });
|
||||
const durations = () =>
|
||||
page.locator("body").evaluate((body) => {
|
||||
const style = getComputedStyle(body);
|
||||
return [style.animationDuration, style.transitionDuration];
|
||||
});
|
||||
const REDUCED = ["0.00001s", "1e-05s"];
|
||||
await page.goto("/");
|
||||
const duration = await page
|
||||
.locator("body")
|
||||
.evaluate((body) => getComputedStyle(body).animationDuration);
|
||||
expect(["0s", "0.00001s", "1e-05s"]).toContain(duration);
|
||||
expect(await durations()).toEqual(["0s", "0s"]);
|
||||
|
||||
await page.emulateMedia({ reducedMotion: "reduce" });
|
||||
|
||||
const [animation, transition] = await durations();
|
||||
expect(REDUCED).toContain(animation);
|
||||
expect(REDUCED).toContain(transition);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import AxeBuilder from "@axe-core/playwright";
|
||||
import type { Page, Route } from "@playwright/test";
|
||||
import { WCAG_AXE_TAGS } from "../support/browser/axe-tags.ts";
|
||||
|
||||
import { KO_MESSAGES } from "../../src/presentation/i18n/catalog.ts";
|
||||
import { expect, test } from "../support/browser/strict-browser-test.ts";
|
||||
@@ -28,7 +29,7 @@ import { startBuildServer } from "./support/service-worker-builds.ts";
|
||||
*/
|
||||
const META = Object.freeze({ requestId: "req-e2e", traceId: "0af7651916cd43dd8448eb211c80319c" });
|
||||
const ITEM = Object.freeze({ id: "browser-order", name: "Browser order" });
|
||||
const WCAG_TAGS = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"];
|
||||
const WCAG_TAGS = [...WCAG_AXE_TAGS];
|
||||
|
||||
let builds: FixtureBuilds<"a"> | undefined;
|
||||
let server: Awaited<ReturnType<typeof startBuildServer>> | undefined;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import AxeBuilder from "@axe-core/playwright";
|
||||
import { expect, test } from "../support/browser/strict-browser-test.ts";
|
||||
import { WCAG_AXE_TAGS } from "../support/browser/axe-tags.ts";
|
||||
|
||||
test("persists an explicit color scheme through the storage contract", async ({
|
||||
page,
|
||||
@@ -11,7 +12,7 @@ test("persists an explicit color scheme through the storage contract", async ({
|
||||
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
|
||||
await expect(page.locator("html")).toHaveCSS("color-scheme", "dark");
|
||||
const results = await new AxeBuilder({ page })
|
||||
.withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
|
||||
.withTags([...WCAG_AXE_TAGS])
|
||||
.analyze();
|
||||
expect(
|
||||
results.violations.filter((violation) =>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import AxeBuilder from "@axe-core/playwright";
|
||||
import { WCAG_AXE_TAGS } from "../support/browser/axe-tags.ts";
|
||||
|
||||
import {
|
||||
expect,
|
||||
@@ -62,7 +63,7 @@ test("opened design-system dialog has no blocking violations", async ({
|
||||
await page.getByRole("button", { name: "모달 열기" }).click();
|
||||
const results = await new AxeBuilder({ page })
|
||||
.include(".ui-dialog")
|
||||
.withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
|
||||
.withTags([...WCAG_AXE_TAGS])
|
||||
.analyze();
|
||||
expect(
|
||||
results.violations.filter((violation) =>
|
||||
@@ -71,6 +72,31 @@ test("opened design-system dialog has no blocking violations", async ({
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
// 1112/05-04. The galleries replaced the example screens, whose whole page
|
||||
// the route scan checked. With no feature installed they are the only place
|
||||
// the empty, error, sign-in and access surfaces are drawn, so the whole story
|
||||
// is scanned, in both colour schemes, as the screens were.
|
||||
for (const story of [
|
||||
{ id: "platform-galleries--design-system", heading: "UI 구성요소" },
|
||||
{ id: "platform-galleries--screen-states", heading: "화면 상태" },
|
||||
] as const) {
|
||||
for (const colorScheme of ["light", "dark"] as const) {
|
||||
test(`${story.id} has no blocking violations in ${colorScheme}`, async ({ page }) => {
|
||||
await page.emulateMedia({ colorScheme });
|
||||
await page.goto(`/iframe.html?id=${story.id}&viewMode=story&globals=a11y.manual:!true`);
|
||||
await expect(page.getByRole("heading", { level: 1, name: story.heading })).toBeVisible();
|
||||
const results = await new AxeBuilder({ page })
|
||||
.withTags([...WCAG_AXE_TAGS])
|
||||
.analyze();
|
||||
expect(
|
||||
results.violations
|
||||
.filter((violation) => ["critical", "serious"].includes(violation.impact ?? ""))
|
||||
.map((violation) => `${violation.id}: ${violation.nodes.map((node) => node.target.join(" ")).join(", ")}`),
|
||||
).toEqual([]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
test("runs menu typeahead, tabs and duplicate toast interactions", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* The WCAG rule tags every axe scan runs. 1112/05-05. The product promises
|
||||
* WCAG 2.2 AA (PRODUCT.md), so the 2.2 AA rules axe implements (target size,
|
||||
* 2.5.8) run too. axe has no rule for most 2.2 criteria (focus not obscured,
|
||||
* dragging alternatives); the manual checklist covers those.
|
||||
*/
|
||||
export const WCAG_AXE_TAGS: readonly string[] = Object.freeze([
|
||||
"wcag2a",
|
||||
"wcag2aa",
|
||||
"wcag21a",
|
||||
"wcag21aa",
|
||||
"wcag22aa",
|
||||
]);
|
||||
Reference in New Issue
Block a user