Skip to content

fix: improve image alt text across templates - #56

Merged
Ymax27 merged 3 commits into
Ymax27:mainfrom
sssimransingh26-bit:fix/image-alt-text
Oct 20, 2026
Merged

Ymax27 merged 3 commits into
Ymax27:mainfrom
sssimransingh26-bit:fix/image-alt-text

Conversation

@sssimransingh26-bit

@sssimransingh26-bit sssimransingh26-bit commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Mark navigation, footer and login logos as decorative (alt=""), since the site name is already visible on the page.
  • Mark the profile avatar as decorative, since the username is in the heading beside it.
  • In the nav, keep the username and the "Connexion" label available to screen readers on mobile (sr-only sm:not-sr-only instead of hidden sm:inline), so those links have an accessible name.

Scope check (#48)

  • Reviewed the homepage and Explore cards: home.html has no <img> of its own, and the repo avatars in _issue_card.html already use alt="" because owner/repo is shown next to them. No further changes needed.

Testing

  • Searched all templates for <img>; every image now has an empty alt, and each one has its name or label visible next to it.

Closes #48

@Ymax27 Ymax27 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks a lot for jumping on this so quickly, and welcome to OpenToAll! 🎉

The logo change is spot on: the site name is right next to it, so alt="" avoids a double read-out.

Two small things before we merge:

  1. Leaderboard avatars: the username is already displayed right next to each avatar inside the same link, so alt="{{ username }}" makes screen readers announce it twice. The original alt="" was actually correct there, could you revert those two lines?
  2. Scope: #48 asks to check the homepage and the Explore cards at minimum. Could you take a look at the images there (and add a meaningful alt where an image carries information)? If there's nothing to change, just say so in the PR description.

I've approved the CI run so you'll see the test results. Thanks again!

— Max

@sssimransingh26-bit

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Max! I've pushed the changes:

  • Reverted both leaderboard avatars to alt="", since the username is already in the same link.
  • Scope check for Improve image alt text across the UI #48: home.html has no <img> of its own, and the featured and Explore cards (_issue_card.html) already use alt="" for repo avatars because owner/repo is displayed next to them, so nothing to change there.
  • By the same logic I changed the profile.html avatar and the login page logo to alt="". I searched all templates and every <img> now has an empty alt.
  • One small extra in _nav.html: the profile link and the login button had no accessible name on mobile (their text was hidden sm:inline), so I switched both to sr-only sm:not-sr-only. Happy to drop that if you'd rather keep this PR tight.
  • Possible follow-ups, not in this PR: aria-label on the nav GitHub link and aria-hidden on the Material Symbols icon spans.

Could you re-approve the CI run when you get a chance? Thanks!

@Ymax27 Ymax27 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks great, thanks for the thorough scope check and the mobile accessible-name fix! ✅

— Max

@Ymax27
Ymax27 merged commit 3f3ce83 into Ymax27:main Oct 20, 2026
1 check passed
@Ymax27

Ymax27 commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Merged! 🎉 Thank you so much @sssimransingh26-bit. You handled the feedback quickly, went beyond the issue with a careful audit of every <img>, and fixed the mobile accessible names too. That's exactly the kind of attention to detail that makes OpenToAll better for everyone.

Welcome aboard, and looking forward to your skeleton PR for #27! 🚀

— Max

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.

Improve image alt text across the UI

2 participants