Skip to content

Commit

Permalink
refactor: (#408) aria-hidden 태그로 스크린리더가 span 태그가 읽지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
inyeong-kang committed Sep 4, 2023
1 parent 46fadb0 commit d99422c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions frontend/src/components/VoteStatistics/OneLineGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ export default function OneLineGraph({ ageGroup, size }: GraphProps) {

return (
<S.OptionContainer key={ageResult.name} $size={size}>
<span aria-label={`${ageResult.name} 연령대에서 ${ageResult.total}명이 투표`}>
<span aria-label={`${ageResult.name}에서 ${ageResult.total}명이 투표`}>
{ageResult.total}
</span>
<S.OptionLength $amount={amount} />
<span aria-label="" role="contentinfo">
{ageResult.name}
</span>
<span aria-hidden="true">{ageResult.name}</span>
</S.OptionContainer>
);
})}
Expand Down
10 changes: 3 additions & 7 deletions frontend/src/components/VoteStatistics/TwoLineGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export default function TwoLineGraph({ ageGroup, size }: GraphProps) {
<S.OptionContainer key={ageResult.name} $size={size}>
<S.DataWrapper>
<S.OptionLengthWrapper $gender="FEMALE">
<span
aria-label={`${ageResult.name}연령대에서 ${ageResult.female}명의 여성이 투표`}
>
<span aria-label={`${ageResult.name}에서 ${ageResult.female}명의 여성이 투표`}>
{ageResult.female}
</span>
<S.OptionLength
Expand All @@ -27,15 +25,13 @@ export default function TwoLineGraph({ ageGroup, size }: GraphProps) {
/>
</S.OptionLengthWrapper>
<S.OptionLengthWrapper $gender="MALE">
<span aria-label={`${ageResult.name}연령대에서 ${ageResult.male}명의 남성이 투표`}>
<span aria-label={`${ageResult.name}에서 ${ageResult.male}명의 남성이 투표`}>
{ageResult.male}
</span>
<S.OptionLength $amount={(ageResult.male / maxVoteAmount) * 100} $gender="MALE" />
</S.OptionLengthWrapper>
</S.DataWrapper>
<span aria-label="" role="contentinfo">
{ageResult.name}
</span>
<span aria-hidden="true">{ageResult.name}</span>
</S.OptionContainer>
);
})}
Expand Down

0 comments on commit d99422c

Please sign in to comment.