Skip to content

Commit a910484

Browse files
committed
feat: make site fully accessible
1 parent 57eefa4 commit a910484

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/components/Footer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ const Footer: FC = memo(() => {
2727
<Text>{label}</Text>
2828
</Link>
2929
))}
30-
<Link onClick={() => dispatch('section/toggle')}>
30+
<Link
31+
onClick={() => dispatch('section/toggle')}
32+
onKeyUp={(e) => (e.key === 'Enter' ? dispatch('section/toggle') : null)}
33+
role="button"
34+
tabIndex={0}
35+
>
3136
<Text>{displayedSection === 'about' ? 'my work' : 'about me'}</Text>
3237
</Link>
3338
</Container>

src/components/core/Link.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@ const A = styled<LinkProps>('a')`
1919
transition: opacity 250ms;
2020
text-decoration: ${({ bare }) => (bare ? 'none' : 'underline')};
2121
22-
&:hover,
23-
&:focus-visible {
24-
text-decoration: none;
22+
&:hover {
23+
text-decoration: underline dotted;
2524
opacity: ${({ bare }) => (bare ? 0.8 : 1)};
2625
}
2726
27+
&:focus {
28+
outline: none;
29+
}
30+
31+
&:focus-visible {
32+
outline: 1px solid blue;
33+
}
34+
2835
${screen.mobile} {
2936
font-size: 15px;
3037
}

0 commit comments

Comments
 (0)