feat(blog): add aria-label attributes to improve accessibility
This commit is contained in:
parent
2df268342d
commit
6de5253559
4 changed files with 15 additions and 4 deletions
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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 />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue