diff --git a/B05_Profile/B05_Profile_UI_Drainage_Facility_Fields.ts b/B05_Profile/B05_Profile_UI_Drainage_Facility_Fields.ts index 278c5860..c330d03c 100644 --- a/B05_Profile/B05_Profile_UI_Drainage_Facility_Fields.ts +++ b/B05_Profile/B05_Profile_UI_Drainage_Facility_Fields.ts @@ -60,6 +60,10 @@ export function labeled(text: string, input: HTMLElement): HTMLLabelElement { const caption = document.createElement("span"); caption.textContent = text; wrapper.append(caption, input); + // 묶음(스텝 등)을 담으면 라벨의 암묵 대상이 첫 버튼이 된다 — 안쪽 입력을 명시로 + // 가리켜 라벨 hover·클릭이 버튼으로 새지 않게 한다(2026-08-29 사용자 보고). + const inner = input.querySelector?.("input, select, textarea") as HTMLElement | null; + if (inner?.id) wrapper.htmlFor = inner.id; return wrapper; } @@ -77,9 +81,16 @@ export function numberInput(step: string, min = "0", placeholder = ""): HTMLInpu * 고칠 수 있게 한다. 래퍼 여백은 0이라 기존 격자 레이아웃을 흔들지 않는다. * 버튼은 값을 고친 뒤 input·change를 모두 울려 기존 리스너(연동·저장)가 그대로 탄다. */ +/** 스텝 묶음 입력에 붙일 일련번호 — 라벨이 가리킬 대상을 명시하는 데 쓴다. */ +let stepperSeq = 0; + export function stepper(input: HTMLInputElement, stepM: number): HTMLElement { const wrap = document.createElement("div"); wrap.className = "b05-structure__stepper"; + // 라벨이 이 입력을 가리키게 id를 붙인다. 없으면