Skip to content

Improved accessibility: added alt and title to logo image#4645

Merged
walterbender merged 2 commits intosugarlabs:masterfrom
harleenkaur2003:master
Apr 27, 2025
Merged

Improved accessibility: added alt and title to logo image#4645
walterbender merged 2 commits intosugarlabs:masterfrom
harleenkaur2003:master

Conversation

@harleenkaur2003
Copy link
Contributor

@harleenkaur2003 harleenkaur2003 commented Apr 25, 2025

Changes Made:

  • Updated <amp-img> tag in index.html to include proper alt attributes.

Why:

  • Improves accessibility (screen reader support)
  • Enhances semantic HTML for better UX

Notes:

Self-initiated contribution while exploring MusicBlocks as part of the Code4GovTech 2025 program.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Member

I am unfamiliar with the title attribute. What is it for?

@harleenkaur2003
Copy link
Contributor Author

I am unfamiliar with the title attribute. What is it for?

Thank you for reviewing my PR.
The title attribute provides a small tooltip when a user hovers their mouse over the image - in this case, it would show “MusicBlocks Logo”.

It’s a small UX improvement that gives extra context to visual users without affecting accessibility.

I’m happy to remove it if you feel it’s unnecessary. Appreciate your time and feedback.

@walterbender
Copy link
Member

I never knew about that feature and cannot find it here: https://www.w3schools.com/tags/tag_img.asp Can you please point me to the documentation?

@harleenkaur2003
Copy link
Contributor Author

I reviewed it again and realized that while the title attribute is standard for normal HTML , the component is part of AMP framework and has stricter specifications.

If you prefer I can remove the title attribute to stay fully aligned with amp specs.

Please let me know, and I’ll update the PR accordingly.

Thanks again for your guidance and helping me learn.

@walterbender
Copy link
Member

It is prob. better to remove it if it is not standard HTML.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@harleenkaur2003
Copy link
Contributor Author

Requested changes have been made.

  • Removed the title attribute from as per your feedback.
  • Updated the PR description .

Please review when convenient. Thank you again.

@walterbender walterbender merged commit 7a3e106 into sugarlabs:master Apr 27, 2025
1 check passed
sa-fw-an pushed a commit to sa-fw-an/musicblocks that referenced this pull request Apr 29, 2025
…4645)

* Improved accessibility: added alt and title to logo image

* fix: removed title attribute from amp-img
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.

2 participants