Skip to content

Commit 5ccbcdd

Browse files
Fix the altText issue for gallery images (#475)
1 parent a166d63 commit 5ccbcdd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/components/content/IsaacFeaturedProfile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface IsaacFeaturedProfileProps {
1212
export const IsaacFeaturedProfile = ({ doc, contentIndex }: IsaacFeaturedProfileProps) => {
1313
const path = doc.image && doc.image.src && apiHelper.determineImageUrl(doc.image.src);
1414
const summary = doc.children && doc.children[0];
15+
const profileImageAlt = doc.image?.altText || (doc.title ? `${doc.title} profile image` : "Profile image");
1516

1617
return (
1718
<div
@@ -20,7 +21,7 @@ export const IsaacFeaturedProfile = ({ doc, contentIndex }: IsaacFeaturedProfile
2021
}`}
2122
>
2223
<div>
23-
<img className="profile-image" src={path} alt="" />
24+
<img className="profile-image" src={path} alt={profileImageAlt} />
2425
</div>
2526
<Row className="profile-titles">
2627
<Col>

0 commit comments

Comments
 (0)