Add alt text

This commit is contained in:
Marcus Blättermann 2023-01-24 09:25:10 +01:00
parent 8384ff3d6d
commit 1d36bc6be1
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -195,7 +195,7 @@ const SpaCyVersion = ({ version }) => {
)) ))
} }
const ImageGitHub = ({ url, isRounded }) => ( const ImageGitHub = ({ url, isRounded, title }) => (
// eslint-disable-next-line @next/next/no-img-element // eslint-disable-next-line @next/next/no-img-element
<img <img
style={{ style={{
@ -204,7 +204,7 @@ const ImageGitHub = ({ url, isRounded }) => (
verticalAlign: 'middle', verticalAlign: 'middle',
}} }}
src={`https://img.shields.io/github/${url}`} src={`https://img.shields.io/github/${url}`}
alt="" alt={`${title} on GitHub`}
/> />
) )
@ -217,14 +217,17 @@ const Project = ({ data, components }) => (
{data.github && ( {data.github && (
<Link to={`https://github.com/${data.github}`} hidden> <Link to={`https://github.com/${data.github}`} hidden>
<ImageGitHub <ImageGitHub
title={data.title || data.id}
url={`release/${data.github}/all.svg?style=flat-square`} url={`release/${data.github}/all.svg?style=flat-square`}
isRounded isRounded
/> />
<ImageGitHub <ImageGitHub
title={data.title || data.id}
url={`license/${data.github}.svg?style=flat-square`} url={`license/${data.github}.svg?style=flat-square`}
isRounded isRounded
/> />
<ImageGitHub <ImageGitHub
title={data.title || data.id}
url={`stars/${data.github}.svg?style=social&label=Stars`} url={`stars/${data.github}.svg?style=social&label=Stars`}
/> />
</Link> </Link>