Skip to content

[Accessibility] Add missing alt attributes to images in collections and layouts#2601

Open
bhavyamsharmaa wants to merge 2 commits intomeshery:masterfrom
bhavyamsharmaa:fix-image-alt-tags-issue-2598
Open

[Accessibility] Add missing alt attributes to images in collections and layouts#2601
bhavyamsharmaa wants to merge 2 commits intomeshery:masterfrom
bhavyamsharmaa:fix-image-alt-tags-issue-2598

Conversation

@bhavyamsharmaa
Copy link

Description

This PR fixes #2598

Instead of leaving images without alt tags and hurting SEO, I went through the collections and _layouts folders to add alt attributes to all the missing img tags. Pulled the text for the alt tags mostly from the image source names to make them descriptive enough for screen readers.

Notes for Reviewers

Checked locally, no broken images. This specifically addresses the missing alt issue on blog posts and single page models.

Signed commits

  • Yes, I signed my commits.

…youts

Signed-off-by: Bhavyam <positionbhavyamsharma@gmail.com>
@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for mesheryio-preview ready!

Name Link
🔨 Latest commit 9662982
🔍 Latest deploy log https://app.netlify.com/projects/mesheryio-preview/deploys/699befcec743e800082cfa0c
😎 Deploy Preview https://deploy-preview-2601--mesheryio-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @bhavyamsharmaa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a crucial accessibility and SEO improvement by systematically adding alt attributes to <img> tags throughout the website's layouts and content. These changes ensure that all images are properly described, making the content more accessible to screen readers and more discoverable by search engines, thereby contributing to a more inclusive and optimized web presence.

Highlights

  • Improved Web Accessibility: Added missing alt attributes to numerous <img> tags across the website, enhancing the experience for users relying on screen readers.
  • Enhanced SEO: Provided descriptive text for images through alt attributes, which can improve the website's search engine ranking and image discoverability.
  • Comprehensive Coverage: Addressed missing alt tags in various layouts (_layouts folder) and content collection pages (collections folder), including single page models and blog posts.
Changelog
  • _layouts/single-page-extension.html
    • Added a dynamic alt attribute using a Liquid tag to an image element.
  • _layouts/single-page-model.html
    • Introduced dynamic alt attributes using Liquid tags to multiple image elements within the model display and component sections.
  • collections/_pages/brand.html
    • Added empty alt attributes to several logo images for decorative purposes.
    • Assigned descriptive alt attributes to Meshery logo images, zoom backgrounds, presentation images, social media images, and mascot illustrations.
  • collections/_pages/community.html
    • Added descriptive alt attributes to various SVG icons representing resources like 'Clipboard', 'Shape', 'Bookmark', 'Calendar', and 'Rocket'.
  • collections/_pages/recognition.md
    • Added an alt attribute with the value 'Recognition Program' to the main recognition program image.
  • collections/_posts/2020/2020-05-21-meshmark-explained.md
    • Added an alt attribute with the value 'Distributed Performance Green' to an image.
  • collections/_posts/2020/2020-07-30-analyzing-with-smp.md
    • Added an alt attribute with the value 'Mesh Cubes' to an image.
  • collections/_posts/2020/2020-12-02-kubecon-+cloudnativecon.md
    • Added an alt attribute with the value 'Service Mesh Implementations' to an image.
  • collections/_posts/2023/2023-01-09-meshery-system-provider.md
    • Added an alt attribute with the value 'System Provider' to an image.
  • collections/_posts/2023/2023-06-16-changing-meshery-release-channels.md
    • Added alt attributes with values 'Change Meshery Release Channels' and 'Meshery Version' to respective images.
  • collections/_posts/2023/2023-9-2-meshery-badge-program.md
    • Added an alt attribute with the value 'Recognition Banner' to an image.
  • collections/_posts/2024/2024-12-20-meshery-v0.8.0-release-announcement.md
    • Added alt attributes with values 'Five Legos', 'Playground Card Background', and 'Meshery Catalog' to images within the post.
  • collections/_posts/2025/02/2025-02-01-ninth-highest-velocity-cncf-project.md
    • Added an alt attribute with the value 'Maintainers And Contributors' to an image.
  • collections/_posts/2025/03/27/2025-03-27-meshery-at-kubecon-eu-2025-security-slam.md
    • Added an alt attribute with the value 'Security Sentinel' to an image.
  • collections/_posts/2025/03/31/2025-3-31-meshery-reaches-7000-stars.md
    • Added alt attributes with values 'Five Holding Onto Rocket', 'Meshery Catalog', and 'Meshery Community Overview' to images.
  • collections/_posts/2025/10/25/2025-10-05-introducing-shape-builder-extension.md
    • Added an alt attribute with the value 'Site' to an image.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily adds alt attributes to numerous <img> tags across various HTML and Markdown files to improve accessibility. Specifically, alt attributes were added to images in _layouts/single-page-extension.html, _layouts/single-page-model.html, collections/_pages/brand.html, collections/_pages/community.html, collections/_pages/recognition.md, and several blog posts (collections/_posts).

The review comments highlight several issues: merge conflicts in _layouts/single-page-model.html that need resolution, and incorrect or non-descriptive alt attribute values. For instance, alt="{{Page" and alt="{{ Component" in the layout files are syntactically incorrect and should be updated to use proper Liquid syntax like alt="{{ page.title }}" or alt="{{ component.name }}". Additionally, several alt="Shape" attributes in collections/_pages/community.html are identified as decorative and should be changed to alt="", while alt="Site" in a blog post is deemed insufficiently descriptive and a more detailed alternative is suggested.

data-snapshot-dark="{{page.whiteImage}}"
src="{{page.colorImage}}"
onerror="this.src='/assets/images/meshery-color.svg'" loading="lazy" onclick="toggleFullScreenImage('{{ page.colorImage }}', 'extension')" />
onerror="this.src='/assets/images/meshery-color.svg'" loading="lazy" onclick="toggleFullScreenImage('{{ page.colorImage }}', 'extension')" alt="{{Page" />
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The alt attribute has invalid Liquid syntax ({{Page). It's missing the closing braces and the variable name might be incorrect. For an extension page, using the page title as the alt text is a good practice.

				  onerror="this.src='/assets/images/meshery-color.svg'" loading="lazy" onclick="toggleFullScreenImage('{{ page.colorImage }}', 'extension')"  alt="{{ page.title }}" />

Comment on lines +111 to +123
<<<<<<< Updated upstream
<img class="image-class"
data-snapshot-light="{{ page.colorIcon }}"
data-snapshot-dark="{{ page.whiteIcon }}"
src="{{ page.colorIcon }}"
onerror="this.src='/assets/images/meshery-color.svg'"
loading="lazy"
onclick="toggleFullScreenImage('{{ page.colorIcon }}', 'model')" />
=======
<img class="image-class" data-snapshot-light="{{ page.colorIcon }}" data-snapshot-dark="{{ page.whiteIcon }}"
src="{{ page.colorIcon }}" onerror="this.src='/assets/images/meshery-color.svg'" loading="lazy"
onclick="toggleFullScreenImage('{{ page.colorIcon }}', 'model')" alt="{{ Page" />
>>>>>>> Stashed changes
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This file contains merge conflict markers (<<<<<<<, =======, >>>>>>>). These must be resolved before this pull request can be merged. After resolving the conflict, please also fix the alt attribute, as alt="{{ Page" is syntactically incorrect. It should likely be alt="{{ page.title }}".

Comment on lines +214 to +228
<<<<<<< Updated upstream
<div style="text-align: center; width: 150px;">
<img src="{{site.baseurl}}/{{ component.colorIcon }}"
onerror="this.src='/assets/images/meshery-color.svg'"
style="width: 100px; height: 100px; object-fit: contain;"
loading="lazy" />
<p><strong>{{ component.name }}</strong></p>
</div>
=======
<div style="text-align: center; width: 150px;">
<img src="{{site.baseurl}}/{{ component.colorIcon }}" onerror="this.src='/assets/images/meshery-color.svg'"
style="width: 100px; height: 100px; object-fit: contain;" loading="lazy" alt="{{ Component" />
<p><strong>{{ component.name }}</strong></p>
</div>
>>>>>>> Stashed changes
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This section also contains merge conflict markers that need to be resolved. The alt attribute within the conflict, alt="{{ Component", is also syntactically incorrect. After resolving the conflict, please use a descriptive alt text, like alt="{{ component.name }}".

<div class="heading-shape">
<h2 class="margin-padding-none">User Tutorials</h2>
<img src="../../assets/images/resources-section/svg/shape.svg" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This image appears to be decorative. For decorative images, it's best practice to use an empty alt attribute (alt="") to signal to screen readers that they can be ignored. The current alt="Shape" does not provide meaningful information.

Suggested change
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="" />

<div class="heading-shape">
<h2 class="margin-padding-none">Contributor Training</h2>
<img src="../../assets/images/resources-section/svg/shape.svg" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This image appears to be decorative. For decorative images, it's best practice to use an empty alt attribute (alt="") to signal to screen readers that they can be ignored. The current alt="Shape" does not provide meaningful information.

Suggested change
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="" />

<div class="heading-shape">
<h2 class="margin-padding-none">Docs</h2>
<img src="../../assets/images/resources-section/svg/shape.svg" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This image appears to be decorative. For decorative images, it's best practice to use an empty alt attribute (alt="") to signal to screen readers that they can be ignored. The current alt="Shape" does not provide meaningful information.

Suggested change
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="" />

<div class="heading-shape">
<h2 class="margin-padding-none">Newcomers Journey</h2>
<img src="../../assets/images/resources-section/svg/shape.svg" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This image appears to be decorative. For decorative images, it's best practice to use an empty alt attribute (alt="") to signal to screen readers that they can be ignored. The current alt="Shape" does not provide meaningful information.

Suggested change
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="" />

<div class="heading-shape">
<h2 class="margin-padding-none">Playgrounds</h2>
<img src="../../assets/images/resources-section/svg/shape.svg" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This image appears to be decorative. For decorative images, it's best practice to use an empty alt attribute (alt="") to signal to screen readers that they can be ignored. The current alt="Shape" does not provide meaningful information.

Suggested change
<img src="../../assets/images/resources-section/svg/shape.svg" alt="Shape" />
<img src="../../assets/images/resources-section/svg/shape.svg" alt="" />

Meshery is proud to announce the release of the Shape Builder extension—a powerful tool that allows you to create custom polygon shapes to visually design and manage your cloud native infrastructure. This extension further enriches the Meshery platform, empowering users to craft detailed architecture diagrams that are tailored to their unique deployments.

<img src="https://raw.githubusercontent.com/meshery-extensions/shape-builder/98531eecdd2c5b01895f1d818f824bf186bf6077/.github/assets/images/site.png" width="100%" align="center" />
<img src="https://raw.githubusercontent.com/meshery-extensions/shape-builder/98531eecdd2c5b01895f1d818f824bf186bf6077/.github/assets/images/site.png" width="100%" align="center" alt="Site" />
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The alt text "Site" is not descriptive. A more meaningful alt text, such as "Shape Builder extension user interface", would better describe the image content for users of screen readers.

Suggested change
<img src="https://raw.githubusercontent.com/meshery-extensions/shape-builder/98531eecdd2c5b01895f1d818f824bf186bf6077/.github/assets/images/site.png" width="100%" align="center" alt="Site" />
<img src="https://raw.githubusercontent.com/meshery-extensions/shape-builder/98531eecdd2c5b01895f1d818f824bf186bf6077/.github/assets/images/site.png" width="100%" align="center" alt="Shape Builder extension user interface" />

Signed-off-by: Bhavyam <positionbhavyamsharma@gmail.com>
@Bhumikagarggg
Copy link
Contributor

@bhavyamsharmaa Thank you for your contribution! Let's discuss this during the website call today at 6:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂

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.

[Accessibility] Missing alt attributes on images across blog posts and collections

2 participants