Skip to content

Commit 0bd4f8d

Browse files
committed
feat: 후원사 섹션 접근성 개선 및 버튼 스타일 추가
1 parent cd6d6d1 commit 0bd4f8d

File tree

1 file changed

+58
-8
lines changed
  • apps/pyconkr/src/components/layout/Sponsor

1 file changed

+58
-8
lines changed

apps/pyconkr/src/components/layout/Sponsor/index.tsx

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,34 @@ export default function Sponsor() {
3333
if (!isVisible) return null;
3434

3535
return (
36-
<SponsorContainer>
37-
<SponsorTitle>후원사 목록</SponsorTitle>
38-
<SponsorGrid>
36+
<SponsorSection aria-label="후원사 섹션">
37+
<SponsorTitle as="h4" role="heading" aria-level={4}>
38+
후원사 목록
39+
</SponsorTitle>
40+
<SponsorGrid role="list" aria-label="후원사 목록 그리드">
3941
{sponsors.map((sponsor) => (
40-
<SponsorItem key={sponsor.id}>
41-
<sponsor.Logo />
42+
<SponsorItem key={sponsor.id} role="listitem">
43+
<SponsorButton
44+
type="button"
45+
aria-label={`${sponsor.name} 상세 정보 보기`}
46+
>
47+
<span className="sr-only">{sponsor.name}</span>
48+
<sponsor.Logo aria-hidden="true" />
49+
</SponsorButton>
4250
</SponsorItem>
4351
))}
4452
</SponsorGrid>
45-
</SponsorContainer>
53+
</SponsorSection>
4654
);
4755
}
4856

49-
const SponsorContainer = styled.div`
57+
const SponsorSection = styled.section`
5058
width: 1067px;
5159
margin: 0 auto;
5260
margin-bottom: 140px;
5361
`;
5462

55-
const SponsorTitle = styled.h5`
63+
const SponsorTitle = styled.h4`
5664
font-weight: 600;
5765
font-size: 37px;
5866
text-align: center;
@@ -71,7 +79,49 @@ const SponsorGrid = styled.div`
7179
const SponsorItem = styled.div`
7280
width: 240px;
7381
height: 75px;
82+
`;
83+
84+
const SponsorButton = styled.button`
85+
width: 100%;
86+
height: 100%;
7487
display: flex;
7588
align-items: center;
7689
justify-content: center;
90+
background: none;
91+
border: none;
92+
padding: 0;
93+
cursor: pointer;
94+
transition: transform 0.2s ease;
95+
96+
&:focus {
97+
outline: 2px solid #007aff;
98+
outline-offset: 4px;
99+
border-radius: 4px;
100+
}
101+
102+
&:focus:not(:focus-visible) {
103+
outline: none;
104+
}
105+
106+
&:focus-visible {
107+
outline: 2px solid #007aff;
108+
outline-offset: 4px;
109+
border-radius: 4px;
110+
}
111+
112+
&:hover {
113+
transform: scale(1.05);
114+
}
115+
116+
.sr-only {
117+
position: absolute;
118+
width: 1px;
119+
height: 1px;
120+
padding: 0;
121+
margin: -1px;
122+
overflow: hidden;
123+
clip: rect(0, 0, 0, 0);
124+
white-space: nowrap;
125+
border: 0;
126+
}
77127
`;

0 commit comments

Comments
 (0)