Skip to content

Add alt text to img elements for accessibility - #194

Open
ultraboy5522 wants to merge 1 commit into
Virtual4087:mainfrom
ultraboy5522:fix/add-image-alt-tags
Open

Add alt text to img elements for accessibility #194
ultraboy5522 wants to merge 1 commit into
Virtual4087:mainfrom
ultraboy5522:fix/add-image-alt-tags

Conversation

@ultraboy5522

Copy link
Copy Markdown

Resolves #190
audited and updated the alt attributes across all <img> tags on the page to make sure they follow proper accessibility (a11y/WCAG) standards:

  • Country cards: Set alt="" on the images. Because the image and the text label (e.g., <span>Hong Kong</span>) live inside the same <a> tag, giving the image its own alt text caused screen readers to read the country name twice ("Hong Kong image Hong Kong link"). Marking the image as decorative lets the screen reader just announce just the link text.
  • Logos & Icons: Added descriptive alt text for standalone graphics that sit outside text tags (like alt="Target logo" and alt="Upward trend icon").

Everything has been tested and works as intended.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for opening a pull request @ultraboy5522. We will review it as soon as possible 🙌❤️

@ultraboy5522

Copy link
Copy Markdown
Author

Hi @Virtual4087, hope you're doing well! Whenever you get a chance, would you mind taking a quick look at this accessibility fix? No rush at all. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing alt tag to all images

1 participant