From 9dfa8f54222f7b206d0e970ec5a336d77440e923 Mon Sep 17 00:00:00 2001 From: htlee Date: Wed, 8 Apr 2026 12:50:51 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20Select=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=EC=84=B1=20=E2=80=94=20aria-label=20=ED=95=84=EC=88=98=20+=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=ED=8B=B0=EB=B8=8C=20 5곳 aria-label 추가: - admin/SystemConfig: 대분류 필터 - detection/RealVesselAnalysis: 해역 필터 - detection/RealGearGroups: 그룹 유형 필터 - detection/ChinaFishing: 관심영역 선택 - detection/GearIdentification: SelectField에 label prop 추가 - 쇼케이스 FormSection Select 샘플에 aria-label 추가 이제 모든 Select 사용처가 접근 이름을 가지며, 향후 신규 Select 사용 시 tsc가 누락을 차단함. --- .../design-system/sections/FormSection.tsx | 2 +- frontend/src/features/admin/SystemConfig.tsx | 1 + .../src/features/detection/ChinaFishing.tsx | 2 +- .../features/detection/GearIdentification.tsx | 8 +++--- .../src/features/detection/RealGearGroups.tsx | 2 +- .../features/detection/RealVesselAnalysis.tsx | 2 +- frontend/src/shared/components/ui/select.tsx | 26 ++++++++++++++++--- 7 files changed, 33 insertions(+), 10 deletions(-) diff --git a/frontend/src/design-system/sections/FormSection.tsx b/frontend/src/design-system/sections/FormSection.tsx index 802d17b..655f1d4 100644 --- a/frontend/src/design-system/sections/FormSection.tsx +++ b/frontend/src/design-system/sections/FormSection.tsx @@ -63,7 +63,7 @@ export function FormSection() { {(['sm', 'md', 'lg'] as const).map((size) => ( - diff --git a/frontend/src/features/admin/SystemConfig.tsx b/frontend/src/features/admin/SystemConfig.tsx index d731be9..0fda9dd 100644 --- a/frontend/src/features/admin/SystemConfig.tsx +++ b/frontend/src/features/admin/SystemConfig.tsx @@ -232,6 +232,7 @@ export function SystemConfig() {
+ diff --git a/frontend/src/features/detection/GearIdentification.tsx b/frontend/src/features/detection/GearIdentification.tsx index a606bb4..1710d74 100644 --- a/frontend/src/features/detection/GearIdentification.tsx +++ b/frontend/src/features/detection/GearIdentification.tsx @@ -470,13 +470,15 @@ function Toggle({ checked, onChange, label }: { checked: boolean; onChange: (v: ); } -function SelectField({ value, onChange, options }: { +function SelectField({ label, value, onChange, options }: { + label: string; value: string; onChange: (v: string) => void; options: { value: string; label: string }[]; }) { return ( setFilterType(e.target.value)} + setZoneFilter(e.target.value)} + ... + * + */ + +type BaseSelectProps = Omit, 'size'> & { size?: InputSize; state?: InputState; -} +}; + +type SelectWithAccessibleName = + | (BaseSelectProps & { 'aria-label': string }) + | (BaseSelectProps & { 'aria-labelledby': string }) + | (BaseSelectProps & { title: string }); + +export type SelectProps = SelectWithAccessibleName; -/** Select — Input과 동일한 스타일 토큰 공유 */ export const Select = forwardRef( ({ className, size, state, children, ...props }, ref) => { return (