문제: 폭 48rem 미만(휴대폰, 1280px 창의 약 170% 이상 확대)에서
responsive.css가 머리글의 색상 테마 선택, 세션 상태, 브랜드를
display: none으로 숨긴다. 메뉴 서랍에는 주요 탐색만 있어서 이 기능과
정보를 쓸 곳이 없다. WCAG 2.2 1.4.10(Reflow)의 "기능·정보 손실 없이"
조건을 어긴다.
고른 방법: 머리글은 지금처럼 두고, 서랍에 브랜드 이름(탐색 위)과 색상
테마 선택·세션 상태(탐색 아래)를 넣는다.
- 테마 선택과 세션 상태를 app-shell.tsx 안의 ThemePreferenceSelect,
SessionStatus로 뽑아 머리글과 서랍이 같은 컴포넌트를 쓴다. 둘 다
기존 ThemeProvider·SessionProvider를 직접 읽어 따로 든 상태가 없다.
- 서랍 쪽 select id는 mobile-theme-preference로 달리 줘서 id가 겹치지
않는다. 머리글 #theme-preference는 그대로다(시각 테스트가 쓴다).
- 서랍 쪽은 라벨을 보이게 두고 theme-selector 클래스를 붙이지 않는다.
그래서 i18n.spec의 "머리글 선택 상자 2개" 검사가 그대로 맞는다.
- 브랜드는 화면을 보고 서랍 위쪽에 링크가 아닌 글자로 넣었다. 서랍에
"홈" 링크가 이미 있어 링크로 두면 같은 곳으로 가는 Tab 정지가 는다.
- 숨김 규칙(responsive.css)과 머리글(app-shell.tsx)에 서랍이 대신
보여 준다는 주석을 달았다.
버린 대안:
- 머리글에 테마 아이콘 메뉴 버튼(리뷰 5.3 (C)): 새 컴포넌트가 필요하고
320px 머리글 공간을 다툰다. 머리글은 단순하게 두기로 정했다.
- 서랍이 열릴 때만 서랍 쪽 컨트롤을 렌더: DOM 중복은 없어지지만 탐색은
항상, 나머지는 조건부로 그리는 이유가 코드에 드러나지 않는다. 탐색이
이미 사이드바와 서랍에 두 벌 있는 방식에 맞췄다.
- 서랍 제목을 앱 이름으로 바꾸기: 대화상자 이름 "메뉴"가 바뀌어 기존
접근성 이름과 테스트가 깨진다.
위험·한계:
- 세션 상태 문구와 테마 select가 DOM에 두 벌 있다. 접근성 트리에는
한 번만 나온다(좁은 폭은 머리글 쪽이 display: none, 넓은 폭은 닫힌
dialog). 다만 페이지 전체에서 getByText로 셸 문구를 찾는 테스트는
strict mode에 걸린다. reference-route.spec의 "인증됨"을 banner로
좁혔다. 다운스트림 테스트도 같은 수정이 필요할 수 있다.
- 640x400(200% 확대)에서는 테마 선택이 서랍 첫 화면 아래에 있어 서랍을
스크롤해야 보인다.
- 좁은 화면 서랍 화면이 바뀐다. 시각 골든
app-shell-compact-pseudo-drawer.png는 이 커밋에서 갱신하지 않았다.
- 초기 JS gzip 203,572 -> 203,648 B(+76 B, 예산 204,800 B). check:bundle은
pnpm을 불러 돌리지 않았고, 같은 분류(classifyViteJavascript)와
gzipSync로 직접 쟀다.
- 실제 기기 터치, 스크린 리더 발표는 확인하지 않았다.
검증:
- RED: tests/e2e/responsive.spec.ts 새 테스트(320·375·640px)가 수정 전
chromium·firefox·webkit 9/9 실패. getByRole('dialog', { name: '메뉴' })
.getByRole('combobox', { name: '색상 테마' }): element(s) not found.
- GREEN: 같은 테스트 9/9 통과. 마지막 탐색 링크에서 Tab으로 테마 선택에
닿고, dark·light 선택에 html[data-theme]이 바뀐다. 서랍에 "로그인 전"과
브랜드가 보인다.
- 회귀 e2e: responsive·i18n·theme·accessibility·app-shell·reference-route
(세 엔진) + compact-smoke(chromium-compact) 85/85 통과. app-shell.spec의
Esc 닫기·포커스 복원·서랍 링크 뒤 h1 포커스 포함. 수정 전에는
reference-route가 세 엔진에서 strict mode로 실패하는 것을 확인했다.
- 열린 서랍 axe(375px, light·dark, 세 엔진) 위반 0(일회성, 커밋 안 함).
- node scripts/run-vitest.ts run tests/component: 211/211 통과.
- tsc(app·test·node) 0, eslint(바꾼 tsx·spec) 0, check-design-system
PASS, check-architecture(pnpm 대신 exec 전용 shim) PASS.
- Playwright는 webServer만 `npx vite preview`로 바꾼 임시 설정으로
돌렸다(빌드는 node scripts/build-frontend.ts).
Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-01
96 lines
1.9 KiB
CSS
96 lines
1.9 KiB
CSS
@media (max-width: 47.999rem) {
|
|
.app-shell {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
grid-template-areas:
|
|
"header"
|
|
"content";
|
|
}
|
|
|
|
.app-shell__header {
|
|
padding-inline: 0.75rem;
|
|
}
|
|
|
|
.app-shell__menu-button.ui-icon-button {
|
|
display: inline-flex;
|
|
}
|
|
|
|
.app-shell__sidebar {
|
|
position: fixed;
|
|
z-index: 50;
|
|
top: 4.5rem;
|
|
bottom: 0;
|
|
left: 0;
|
|
display: none;
|
|
width: min(18rem, 85vw);
|
|
height: auto;
|
|
box-sizing: border-box;
|
|
box-shadow: 10px 0 30px color-mix(in oklab, var(--color-content) 15%, transparent);
|
|
}
|
|
|
|
.app-shell__sidebar[data-open="true"] {
|
|
display: block;
|
|
}
|
|
|
|
.app-shell__scrim {
|
|
position: fixed;
|
|
z-index: 40;
|
|
inset: 4.5rem 0 0;
|
|
display: block;
|
|
border: 0;
|
|
background: color-mix(in oklab, var(--color-content) 35%, transparent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 08-01. Hidden only in the header: the menu drawer (`app-shell.tsx`)
|
|
shows the session status, the theme selector and the brand instead. */
|
|
.app-shell__session .session-status {
|
|
display: none;
|
|
}
|
|
|
|
.app-shell__session .theme-selector {
|
|
display: none;
|
|
}
|
|
|
|
.app-shell__brand {
|
|
display: none;
|
|
}
|
|
|
|
.readiness-grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.component-grid--two,
|
|
.component-grid--three {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.page-template__heading,
|
|
.page-template__layout[data-has-aside="true"] {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.page-template__heading .page-header {
|
|
grid-row: auto;
|
|
}
|
|
|
|
.page-template__actions,
|
|
.page-template__status {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.form-actions--sticky {
|
|
margin-inline: calc(var(--spacing-page) * -1);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
scroll-behavior: auto !important;
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|