From feffb7cd02305eabcad4957d64aa86840aeeb5dc Mon Sep 17 00:00:00 2001 From: semnil5202 Date: Wed, 29 Nov 2023 21:11:45 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20pinDetail=20=EB=B0=8F=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=EB=B3=B4=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=EC=84=B1=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/PinDetail.tsx | 53 ++++++++++++++++++++++++---- frontend/src/pages/SelectedTopic.tsx | 3 +- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/PinDetail.tsx b/frontend/src/pages/PinDetail.tsx index 79d91977..be6ef933 100644 --- a/frontend/src/pages/PinDetail.tsx +++ b/frontend/src/pages/PinDetail.tsx @@ -16,6 +16,7 @@ import Text from '../components/common/Text'; import Modal from '../components/Modal'; import AddToMyTopicList from '../components/ModalMyTopicList/addToMyTopicList'; import PinImageContainer from '../components/PinImageContainer'; +import { ARIA_FOCUS } from '../constants'; import { ModalContext } from '../context/ModalContext'; import useCompressImage from '../hooks/useCompressImage'; import useFormValues from '../hooks/useFormValues'; @@ -183,13 +184,26 @@ function PinDetail({ return ( - + {pin.name} - + {pin.creator} @@ -200,7 +214,16 @@ function PinDetail({ ) : ( )} - + {pin.updatedAt.split('T')[0].split('-').join('.')} @@ -222,7 +245,13 @@ function PinDetail({ 어디에 있나요? - + {pin.address} @@ -232,7 +261,13 @@ function PinDetail({ 어떤 곳인가요? - + {pin.description} @@ -243,7 +278,11 @@ function PinDetail({ 내 지도에 저장하기 - + 공유하기 @@ -265,11 +304,13 @@ function PinDetail({ onChange={(e: React.ChangeEvent) => setNewComment(e.target.value) } + aria-label="댓글을 추가하려면 텍스트를 입력하세요." placeholder="댓글 추가" /> 등록 diff --git a/frontend/src/pages/SelectedTopic.tsx b/frontend/src/pages/SelectedTopic.tsx index 4f19a6ef..593cea0a 100644 --- a/frontend/src/pages/SelectedTopic.tsx +++ b/frontend/src/pages/SelectedTopic.tsx @@ -27,7 +27,7 @@ function SelectedTopic() { const [selectedPinId, setSelectedPinId] = useState(null); const [isOpen, setIsOpen] = useState(true); const [isEditPinDetail, setIsEditPinDetail] = useState(false); - const { coordinates, setCoordinates } = useContext(CoordinatesContext); + const { setCoordinates } = useContext(CoordinatesContext); const { width } = useSetLayoutWidth(SIDEBAR); const zoomTimerIdRef = useRef(null); const dragTimerIdRef = useRef(null); @@ -170,6 +170,7 @@ function SelectedTopic() { onClick={() => { setIsOpen(!isOpen); }} + aria-label={`장소 상세 설명 버튼 ${isOpen ? '닫기' : '열기'}`} > ◀