Skip to content

Add Avatar test coverage, runtime status validation, and a11y fixes - #329

Merged
chonilius merged 2 commits into
MergeFi:mainfrom
brightpixel-dev:fix/a11y-and-testing-278-281
Aug 25, 2026
Merged

Add Avatar test coverage, runtime status validation, and a11y fixes#329
chonilius merged 2 commits into
MergeFi:mainfrom
brightpixel-dev:fix/a11y-and-testing-278-281

Conversation

@brightpixel-dev

@brightpixel-dev brightpixel-dev commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Closes #278
Closes #279
Closes #280
Closes #281

What changed

  • Added Avatar.test.tsx covering Avatar render (src fallback, dicebear URL, size, className) and AvatarStack overflow counting (under/at/over max)
  • Added coerceStatus() to validate raw bounty status strings against known BountyStatus values, falling back to "open" for unrecognized values
  • adaptBounty now uses coerceStatus instead of passing raw.status directly
  • MilestoneFundButton accepts optional milestoneName prop, sets aria-label "Fund milestone: {name}"
  • PoolDepositButton accepts optional poolRepo prop, sets aria-label "Deposit to pool: {repo}"
  • Fixed heading hierarchy on /issues page: inserted sr-only h2 "Available bounties" between h1 and BountyCard h3's

Why

How to test

  • npx jest src/components/ui/Avatar.test.tsx — all 13 tests pass
  • npx jest src/components/ui/Badge.test.tsx — all 27 tests pass
  • Verify MilestoneFundButton renders with aria-label when milestoneName is provided
  • Verify heading order on /issues: h1 > h2 (sr-only) > h3 (BountyCard)

…tion

- Avatar.test.tsx: covers Avatar render (src fallback, dicebear URL,
  size, className) and AvatarStack overflow counts (under/at/over max)
- coerceStatus: validates raw status strings against known BountyStatus
  values, falling back to "open" for unrecognized values
- adaptBounty: uses coerceStatus instead of passing raw.status directly

Issues: MergeFi#278, MergeFi#279
…archy

- MilestoneFundButton: accept optional milestoneName prop, set aria-label
  "Fund milestone: {name}" for screen readers
- PoolDepositButton: accept optional poolRepo prop, set aria-label
  "Deposit to pool: {repo}" for screen readers
- milestones/page: pass milestoneName and poolRepo to action buttons
- issues/page: insert sr-only h2 "Available bounties" between h1 and
  BountyCard h3's to fix heading hierarchy (h1 → h3 skip)

Issues: MergeFi#280, MergeFi#281
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@brightpixel-dev is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

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