Skip to content

Commit 34f1b7a

Browse files
feat: change the aria label on github and personal site with adding aria-hidden for the icons
1 parent 7b6c3ce commit 34f1b7a

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

src/components/MDX/TeamMember.tsx

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,22 @@ export function TeamMember({
9292
<div
9393
className="hidden sm:block basis-2/5 rounded overflow-hidden relative"
9494
style={{width: 300, height: 250}}>
95-
<Image src={photo} layout="fill" objectFit="cover" alt={name} />
95+
<Image
96+
src={photo}
97+
layout="fill"
98+
objectFit="cover"
99+
alt={`${name}'s profile picture`}
100+
/>
96101
</div>
97102
<div
98103
style={{minHeight: 300}}
99104
className="block w-full sm:hidden flex-grow basis-2/5 rounded overflow-hidden relative">
100-
<Image src={photo} layout="fill" objectFit="cover" alt={name} />
105+
<Image
106+
src={photo}
107+
layout="fill"
108+
objectFit="cover"
109+
alt={`${name}'s profile picture`}
110+
/>
101111
</div>
102112
<div className="ps-0 sm:ps-6 basis-3/5 items-start">
103113
<H3 className="mb-1 sm:my-0" id={permalink}>
@@ -113,7 +123,7 @@ export function TeamMember({
113123
aria-label={`${name} on Twitter`}
114124
href={`https://twitter.com/${twitter}`}
115125
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
116-
<IconTwitter className="pe-1" />
126+
<IconTwitter className="pe-1" aria-hidden="true" />
117127
{twitter}
118128
</ExternalLink>
119129
</div>
@@ -124,7 +134,7 @@ export function TeamMember({
124134
aria-label={`${name} on Threads`}
125135
href={`https://threads.net/${threads}`}
126136
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
127-
<IconThreads className="pe-1" />
137+
<IconThreads className="pe-1" aria-hidden="true" />
128138
{threads}
129139
</ExternalLink>
130140
</div>
@@ -135,27 +145,27 @@ export function TeamMember({
135145
aria-label={`${name} on Bluesky`}
136146
href={`https://bsky.app/profile/${bsky}`}
137147
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
138-
<IconBsky className="pe-1" />
148+
<IconBsky className="pe-1" aria-hidden="true" />
139149
{bsky}
140150
</ExternalLink>
141151
</div>
142152
)}
143153
{github && (
144154
<div className="me-4">
145155
<ExternalLink
146-
aria-label="GitHub Profile"
156+
aria-label={`${name} on Github`}
147157
href={`https://github.com/${github}`}
148158
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
149-
<IconGitHub className="pe-1" /> {github}
159+
<IconGitHub className="pe-1" aria-hidden="true" /> {github}
150160
</ExternalLink>
151161
</div>
152162
)}
153163
{personal && (
154164
<ExternalLink
155-
aria-label="Personal Site"
165+
aria-label={`${name}'s personal site`}
156166
href={`https://${personal}`}
157167
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
158-
<IconLink className="pe-1" /> {personal}
168+
<IconLink className="pe-1" aria-hidden="true" /> {personal}
159169
</ExternalLink>
160170
)}
161171
</div>

0 commit comments

Comments
 (0)