From 6680f2d1c481357a07f7889fb62cbf19ef8bc769 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Tue, 11 Aug 2026 21:28:59 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20[=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=EC=84=B1]=20=EC=97=85=EB=AC=B4=20=EA=B7=B8=EB=A3=B9=20?= =?UTF-8?q?=EC=83=89=EC=83=81=20=EC=84=A0=ED=83=9D=EA=B8=B0=EC=9D=98=20?= =?UTF-8?q?=EB=9D=BC=EB=94=94=EC=98=A4=20=EA=B7=B8=EB=A3=B9=20=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=EC=84=B1=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GroupModal의 색상 스와치 목록이 role="radiogroup"을 사용하고 있으나, 자식 요소들은 일반 button과 aria-pressed를 사용하고 있었습니다. 이는 스크린 리더에서 라디오 그룹 구조를 올바르게 읽지 못하게 만듭니다. 이를 해결하기 위해 자식 스와치 버튼들에 role="radio"를 추가하고 aria-pressed 대신 aria-checked를 사용하도록 변경했습니다. 또한, 테스트 및 스타일도 업데이트했습니다. --- .jules/palette.md | 3 +++ frontend/src/components/modals/GroupModal.tsx | 3 ++- frontend/src/components/modals/ModalCoverage.test.tsx | 2 +- frontend/src/styles.css | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.jules/palette.md b/.jules/palette.md index bd0f73248..2d56049e3 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -57,3 +57,6 @@ ## 2026-07-30 - Add window.confirm for destructive actions **Learning:** Destructive actions like deleting groups and edge relationships previously occurred immediately without user confirmation. **Action:** Always wrap delete operations with window.confirm() dialogs and ensure corresponding tests successfully mock window.confirm. +## 2024-10-24 - Custom Radio Groups Accessibility +**Learning:** 커스텀 UI 요소(색상 스와치 등)를 라디오 그룹으로 사용할 때 `role="radio"` 대신 일반 버튼에 `aria-pressed`를 사용하는 경우가 많습니다. 이는 `radiogroup` 내부에 라디오 대신 버튼이 존재하는 잘못된 ARIA 구조를 만들어 스크린 리더에 혼란을 줍니다. +**Action:** `role="radiogroup"`을 가진 커스텀 라디오 그룹을 만들 때, 자식 요소들은 일반 버튼과 `aria-pressed` 대신 명시적으로 `role="radio"`와 `aria-checked`를 사용하도록 하십시오. 또한 React Testing Library의 쿼리도 'button' 대신 'radio' 역할을 찾도록 업데이트하십시오. diff --git a/frontend/src/components/modals/GroupModal.tsx b/frontend/src/components/modals/GroupModal.tsx index bd96c21b1..e68be5c79 100644 --- a/frontend/src/components/modals/GroupModal.tsx +++ b/frontend/src/components/modals/GroupModal.tsx @@ -75,8 +75,9 @@ export function GroupModal({ {BUSINESS_GROUP_COLORS.map((color) => (