Skip to content

Commit

Permalink
[modify] 알러트 모달 띄울 때 스크린 리더가 타이틀을 바로 읽도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lybell-art committed Aug 22, 2024
1 parent 52d2690 commit 279ffed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mainPage/features/fcfs/cardGame/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function Card({ index, locked, isFlipped, setFlipped, setGlobalLock, getCardAnsw
className={`${cardFaceBaseStyle} ${style.front}`}
src={hidden1x}
srcSet={`${hidden1x} 1x, ${hidden2x} 2x`}
alt={isFlipped ? "" : `${index}번 카드를 뒤집으세요!`}
alt={isFlipped || isPending ? "" : `${index}번 카드를 뒤집으세요!`}
draggable="false"
loading="lazy"
/>
Expand Down
6 changes: 3 additions & 3 deletions src/mainPage/shared/components/AlertModalContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function AlertModalContainer({ title, description, image, children }) {
aria-modal="true"
role="dialog"
aria-labelledby={id}
aria-describedby={description === undefined ? descId : undefined}
aria-describedby={description === undefined ? undefined : descId}
>
<div className="flex flex-col gap-2 items-center">
<p className="text-body-l font-bold text-neutral-700" id={id}>{title}</p>
<p className="w-full max-w-80 text-body-s font-medium text-neutral-400 text-center" id={descId}>
<p className="text-body-l font-bold text-neutral-700" id={id} aria-live="polite">{title}</p>
<p className="w-full max-w-80 text-body-s font-medium text-neutral-400 text-center" id={descId} aria-live={description === undefined ? undefined : "polite"}>
{description}
</p>
</div>
Expand Down

0 comments on commit 279ffed

Please sign in to comment.