Skip to content

fix(accessibility): add alt text to post images#758

Open
mayurigade-hub wants to merge 1 commit into
Shivayan09:mainfrom
mayurigade-hub:fix/post-image-alt-text
Open

fix(accessibility): add alt text to post images#758
mayurigade-hub wants to merge 1 commit into
Shivayan09:mainfrom
mayurigade-hub:fix/post-image-alt-text

Conversation

@mayurigade-hub
Copy link
Copy Markdown
Contributor

Related Issue


Description

Improved accessibility by adding meaningful alt attributes to post images.

Previously, post images were rendered without alt text (or with empty alt attributes), making it difficult for screen reader users to understand image content.

This change ensures that images include descriptive alt text using available post metadata such as captions or descriptions. When no suitable description is available, a fallback format such as:

"Post image by {username}"

is used.

Changes made:

  • Added meaningful alt text for post images
  • Used post caption/description when available
  • Added a fallback alt value when metadata is missing
  • Improved accessibility and WCAG compliance

How Has This Been Tested?

  • Opened posts containing images and inspected rendered image elements
  • Verified that images now include non-empty alt attributes
  • Tested images with captions/descriptions and confirmed those values are used
  • Tested images without captions and confirmed fallback alt text is applied
  • Verified no TypeScript or linting errors after the changes

Screenshots (if applicable)

N/A


Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 1, 2026

@mayurigade-hub is attempting to deploy a commit to the Shivayan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mayurigade-hub
Copy link
Copy Markdown
Contributor Author

Hello @Shivayan09
Please review this
Thank you!

Copy link
Copy Markdown
Owner

@Shivayan09 Shivayan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many unrelated lines of code has been changed which is not related to the issue. Unrelated changes make it harder to review the actual change, so kindly revert those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Add missing alt text to post images for accessibility

2 participants