Skip to content

feat: add accessible tooltip primitive to MarketCard#422

Open
webmirroring wants to merge 1 commit into
Predictify-org:mainfrom
webmirroring:task/tooltip-primitive-365
Open

feat: add accessible tooltip primitive to MarketCard#422
webmirroring wants to merge 1 commit into
Predictify-org:mainfrom
webmirroring:task/tooltip-primitive-365

Conversation

@webmirroring

Copy link
Copy Markdown

Closes #365

Summary

  • Added app/components/Tooltip.tsx, a reusable accessible tooltip primitive with hover delay, keyboard focus support, Escape dismissal, touch long-press support, role="tooltip", and aria-describedby wiring only while the tooltip is rendered.
  • Used the primitive across the marketing MarketCard odds, pool, and ending-time metadata so those compact values have accessible explanatory text.
  • Added focused tests covering delayed hover, focus/Escape, touch long-press, and the aria-describedby relationship.

Validation

  • PASS: /Users/codoon/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/jest/bin/jest.js --runTestsByPath 'app/(marketing)/_components/__tests__/markets-widget.test.tsx' --runInBand
  • PASS: /Users/codoon/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/eslint/bin/eslint.js 'app/components/Tooltip.tsx' 'app/(marketing)/_components/markets-widget.tsx' 'app/(marketing)/_components/__tests__/markets-widget.test.tsx'
  • PASS: git diff --check

Existing repo-level blockers observed

  • tsc --noEmit currently fails on unrelated existing files, including missing ResolutionPreview, ErrorBoundary, shareProfile, getKit, and existing PredictionCard outcome/category references.
  • Full Jest currently has unrelated existing failures: 16 suites failed / 54 passed, 74 tests failed / 539 passed. Examples include connect-wallet-modal missing getKit, event form label associations, and settings tests missing PrivacyProvider.
  • Full next lint currently fails on unrelated existing files such as activity-timeline-demo, EventDetailsClient, layout, PredictionCard.test.tsx, and several react/no-unescaped-entities issues. The files touched in this PR pass direct ESLint.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

@beihaiguaishou is attempting to deploy a commit to the Jagadeesh B's 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add accessible tooltip primitive used across MarketCard

2 participants