fix(B06): 356-2 횡단 카드 초점 걷음 — 마우스로 고른 뒤 키를 눌러도 다른 색 테두리 없음
- 카드 tabIndex · Enter/Space 고름 지움 · ▲▼ 계획고는 창 듣개 그대로(219-1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TteK8mfYZetk5P3bEZkyVZ
This commit is contained in:
@@ -183,11 +183,8 @@ export function createCrossSectionCard(
|
||||
const card: CrossCardElement = document.createElement("article");
|
||||
card.id = `cross-${section.station_id}`;
|
||||
card.className = `b06-cross-card${selected ? " b06-cross-card--selected" : ""}`;
|
||||
card.tabIndex = 0;
|
||||
// 초점 없음(356-2) — 마우스로 고른 뒤 키를 눌러도 초점 테두리 안 뜸 · ▲▼ 계획고는 창 듣개(219-1)
|
||||
card.addEventListener("click", () => onSelect(section.station_id));
|
||||
card.addEventListener("keydown", (event) => {
|
||||
if (event.key === "Enter" || event.key === " ") onSelect(section.station_id);
|
||||
});
|
||||
|
||||
// 선택 표시·면적 강조는 **DOM만 갈아 끼운다**. 카드를 새로 만들면 휠 줌·팬(viewBox)이
|
||||
// 초기화돼 사용자가 맞춰 둔 배율이 날아간다(2026-08-02 사용자 지적).
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
"""356 B06 횡단 카드 — 키 강조 · 중심점 좌우(요구 235-17 · 18).
|
||||
|
||||
못박는 것
|
||||
- 356-2 카드 초점 없음 — 마우스로 고른 뒤 키를 눌러도 초점 테두리(다른 색) 안 뜸 · ▲▼ 계획고는 창 듣개.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
B06 = ROOT / "B06_Section"
|
||||
|
||||
|
||||
def test_카드_초점_없음():
|
||||
view = (B06 / "B06_Section_UI_Cross_View.ts").read_text(encoding="utf-8")
|
||||
assert "card.tabIndex" not in view
|
||||
assert 'card.addEventListener("keydown"' not in view
|
||||
assert 'card.addEventListener("click", () => onSelect(section.station_id));' in view
|
||||
Reference in New Issue
Block a user