feat(blog): add aria-label attributes to improve accessibility

This commit is contained in:
Kim, Jimin 2023-06-17 23:15:38 +09:00
parent 2df268342d
commit 6de5253559
4 changed files with 15 additions and 4 deletions

View file

@ -22,7 +22,12 @@ interface Props {
export default ({ link, size, children }: Props) => {
return (
<StyledGithubLink size={size} href={link} target="_blank">
<StyledGithubLink
aria-label="GitHub repository"
size={size}
href={link}
target="_blank"
>
<FontAwesomeIcon icon={faGithub} />
{children}
</StyledGithubLink>

View file

@ -9,7 +9,12 @@ const SearchButton = () => {
return (
<>
<div>
<Link data-tip data-for="search" to="/search">
<Link
data-tip
data-for="search"
to="/search"
aria-label="go to search page"
>
<HeaderButton>
<FontAwesomeIcon icon={faSearch} />
</HeaderButton>

View file

@ -26,6 +26,7 @@ const ThemeToggleButton = () => {
<>
<StyledThemeButton
data-tip
aria-label="theme toggle"
data-for="theme"
onClick={() =>
dispatch({

View file

@ -45,8 +45,8 @@ export default () => {
return (
<Header>
<Container>
<Link to="/">
<Icon src="/icon/icon_circle.svg" />
<Link to="/" aria-label="homepage">
<Icon src="/icon/icon_circle.svg" alt="logo" />
</Link>
<Nav />
<Buttons />