Skip to content

Commit 0c02419

Browse files
committed
fix: Link name accessibility
Fixed Lighthouse " Links have a discernible name" by adding aria-labels to the facebook, twitter, and linkedin share cards. Lighthouse score 89 -> 92
1 parent eaa34d5 commit 0c02419

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/SocialShare/Facebook.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon, IconPaths } from './icons.js';
44
const facebookLink = "https://www.facebook.com/sharer/sharer.php?u=https://roshanjossey.github.io/first-contributions&quote=Yay%21%20I%20just%20made%20my%20first%20open%20source%20contribution%20with%20First%20Contributions.%20You%20can%20too,%20by%20following%20a%20simple%20tutorial%20at%20https%3A//goo.gl/66Axwe&hashtag=%23Hacktoberfest"
55

66
const FacebookCard = () => (
7-
<a className="icon-card twitter" href={facebookLink} rel="noopener noreferrer" target="_blank">
7+
<a className="icon-card facebook" href={facebookLink} rel="noopener noreferrer" target="_blank" aria-label="Share the news of your first contribution on Facebook">
88
<Icon
99
color="rgb(255, 255, 255)"
1010
size={40}

src/components/SocialShare/Linkedin.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon, IconPaths } from './icons.js';
44
const LinkedinLink = "https://www.linkedin.com/shareArticle?mini=true&url=https://goo.gl/66Axwe&title=First%20Contributions%20&summary=A%20project%20to%20help%20beginners%20get%20started%20with%20contributing%20to%20open%20source&source=https://roshanjossey.github.io"
55

66
const LinkedinCard = () => (
7-
<a className="icon-card linkedin" href={LinkedinLink} rel="noopener noreferrer" target="_blank">
7+
<a className="icon-card linkedin" href={LinkedinLink} rel="noopener noreferrer" target="_blank" aria-label="Share the news of your first contribution on Linkedin">
88
<Icon
99
color="rgb(255, 255, 255)"
1010
size={50}

src/components/SocialShare/Twitter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon, IconPaths } from './icons.js';
44
const twitterLink = "https://twitter.com/intent/tweet?text=Yay%21%20I%20just%20made%20my%20first%20open%20source%20contribution%20with%20@1stcontribution.%20You%20can%20too%20at%20https%3A//goo.gl/66Axwe%0A&hashtags=OpenSource,CodeNewbie,Hacktoberfest"
55

66
const TwitterCard = () => (
7-
<a className="icon-card twitter" href={twitterLink} rel="noopener noreferrer" target="_blank">
7+
<a className="icon-card twitter" href={twitterLink} rel="noopener noreferrer" target="_blank" aria-label="Share the news of your first contribution on Twitter">
88
<Icon
99
color="rgb(255, 255, 255)"
1010
size={40}

0 commit comments

Comments
 (0)