Skip to content

fix: add descriptive fallback alt text to Image in template-card.tsx#311

Open
pooja-0206 wants to merge 1 commit into
piyushdotcomm:mainfrom
pooja-0206:main
Open

fix: add descriptive fallback alt text to Image in template-card.tsx#311
pooja-0206 wants to merge 1 commit into
piyushdotcomm:mainfrom
pooja-0206:main

Conversation

@pooja-0206
Copy link
Copy Markdown

@pooja-0206 pooja-0206 commented May 26, 2026

Summary

  • Changed alt={alt ?? ""} to alt={alt ?? "Template icon"} in IconWithFallback component
  • Empty alt text is bad for accessibility; a descriptive fallback improves screen reader experience

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Test or CI improvement
  • Starter template change

Related issue

Closes #285

Validation

  • npm run lint
  • npm test
  • npm run build

List any additional manual verification you performed:

  • Verified the Image component renders correctly with the updated alt text

Screenshots or recordings

N/A

Checklist

  • I kept this PR focused on one primary change
  • I updated documentation if behavior changed
  • I did not commit secrets, local logs, or scratch files
  • I am requesting review on the correct scope

Summary by CodeRabbit

  • Bug Fixes
    • Fixed missing alt text for template icons by providing a meaningful default description to improve accessibility.

Review Change Stack

@pooja-0206 pooja-0206 requested a review from piyushdotcomm as a code owner May 26, 2026 13:44
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions
Copy link
Copy Markdown

👋 Thanks for opening a PR, @pooja-0206!

Your PR has entered the 🚦 PR Review Pipeline.

Standard PR detected — your PR will follow the standard review pipeline.


What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot DCO · Format · AI/Slop · Duplicate
Stage 2 — Human Review 👥 Maintainer Code + Quality Review
Stage 3 — PA / Maintainer Review 🔑 Project Admin Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits (git commit -s)
  • Link your issue (Closes #123)
  • Use a feature branch (not main)
  • Avoid unrelated changes

This comment is posted only once.

@github-actions github-actions Bot added the good first issue Good for newcomers label May 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bd3c5ff5-bbb1-41e4-b557-5b19c5acda56

📥 Commits

Reviewing files that changed from the base of the PR and between f12b223 and fdbe08a.

📒 Files selected for processing (1)
  • components/marketing/template-card.tsx

Walkthrough

The IconWithFallback component in the template card now provides a meaningful default alt text for template icon images. When no alt prop is explicitly passed, it defaults to "Template icon" instead of an empty string, improving accessibility for screen reader users.

Changes

Accessibility improvement

Layer / File(s) Summary
Template icon alt text
components/marketing/template-card.tsx
Image component's alt prop default changed from "" to "Template icon" for improved accessibility compliance.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🐰 A rabbit hops through the code so bright,
Where template icons now see the light,
Alt text flows like morning dew,
Accessibility for me and you!
No screen reader left behind today,
Templates describe themselves— hooray! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary change: adding descriptive fallback alt text to an Image component in template-card.tsx.
Description check ✅ Passed The PR description follows the template structure with summary, type of change, related issue, validation, and checklist sections; all required information is present.
Linked Issues check ✅ Passed The code change directly fulfills issue #285 by adding a descriptive alt text fallback ('Template icon') to the Image component in template-card.tsx.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the single objective of issue #285; only the alt text fallback value was modified with no extraneous changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pooja-0206
Copy link
Copy Markdown
Author

Hi @piyushdotcomm, I have raised PR #311 for this issue. Please review it. Thank you!

@pooja-0206
Copy link
Copy Markdown
Author

Hi @piyushdotcomm, just a gentle reminder to review PR #311 when you get a chance. Thank you! 😊

@pooja-0206
Copy link
Copy Markdown
Author

pooja-0206 commented May 27, 2026

Hi @piyushdotcomm,
I’ve updated the repository’s Actions → General → Workflow permissions to allow read & write access. The earlier failure (detect-ping-spam) was due to restricted permissions, not the code change itself.

Could you please re‑run the jobs on this PR (#311) when you get a chance? That should clear the pipeline and allow the review/merge process to continue. Thanks!

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

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing alt text to Image in template-card.tsx

1 participant