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) => { export default ({ link, size, children }: Props) => {
return ( return (
<StyledGithubLink size={size} href={link} target="_blank"> <StyledGithubLink
aria-label="GitHub repository"
size={size}
href={link}
target="_blank"
>
<FontAwesomeIcon icon={faGithub} /> <FontAwesomeIcon icon={faGithub} />
{children} {children}
</StyledGithubLink> </StyledGithubLink>

View file

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

View file

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

View file

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