Skip to content

Add empty/loading states and accessible logo alt text to leaderboard ProjectsPodium #196

Description

@Jagadeeshftw

📌 Description

ProjectsPodium (src/features/leaderboard/components/ProjectsPodium.tsx) renders the top-3 projects but has no empty/loading state when topThree is missing, uses empty alt="" on project logos, and gives trophy/medal icons no accessible labels.

💡 Why it matters: Missing data breaks the podium and screen readers get no project/medal context.

🧩 Requirements and context

  • Render a skeleton/loading and an empty state when topThree is unavailable.
  • Provide meaningful alt text (project name) on logos and labels on rank icons.
  • Add a broken-logo fallback.

Non-functional requirements

  • Must be secure, tested, and documented.
  • Should be efficient and easy to review.

🛠️ Suggested execution

1. Fork the repo and create a branch

git checkout -b a11y/projectspodium

2. Implement changes

  • Write/modify the relevant source: src/features/leaderboard/components/ProjectsPodium.tsx
  • Write comprehensive tests: src/features/leaderboard/components/ProjectsPodium.test.tsx
  • Add documentation: inline TSDoc
  • Include TSDoc doc comments
  • Validate security assumptions: n/a

3. Test and commit

  • Run tests:
npm run test
  • Cover edge cases: empty topThree, broken logo, fewer than 3 projects
  • Include test output and security notes in the PR description.

Example commit message

feat(leaderboard): podium empty/loading states + accessible logos

✅ Acceptance criteria

  • Empty + loading states present
  • Logos have meaningful alt; rank icons labeled
  • Broken-logo fallback
  • Tests cover empty/broken/partial

🔒 Security notes

None.

📋 Guidelines

  • Minimum 95% test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions