Skip to content

Comments

fix(a11y): improve chart tooltip contrast in light mode#700

Closed
JarvisInvestInsight wants to merge 7 commits intonpmx-dev:mainfrom
JarvisInvestInsight:fix/chart-tooltip-light-mode
Closed

fix(a11y): improve chart tooltip contrast in light mode#700
JarvisInvestInsight wants to merge 7 commits intonpmx-dev:mainfrom
JarvisInvestInsight:fix/chart-tooltip-light-mode

Conversation

@JarvisInvestInsight
Copy link
Contributor

Summary

Fixes the download chart tooltip being invisible in light mode as reported in #633.

Problem

The tooltip background used \�g-[var(--bg)]/10\ (10% opacity) which works well in dark mode where the contrast comes from the backdrop blur, but in light mode the low opacity resulted in poor contrast against the light chart background.

Solution

Dynamically set the background opacity based on the color mode:

  • Dark mode: 10% opacity (maintains the current frosted glass effect)
  • Light mode: 90% opacity (ensures readable text contrast)

The change is inside the computed \config\ which already depends on \isDarkMode, so the tooltip will update correctly when the theme changes.

Fixes #633


Found this helpful? ☕ Buy me a coffee

- Increase focus ring opacity from 10% to 50% in focus-ring shortcut
- Add ring-offset-bg for consistent offset coloring
- Update input-base focus states (border-fg/50, ring-fg/30) for better visibility
- Change link focus outline from var(--border) to var(--fg-muted) for WCAG compliance

Fixes npmx-dev#647
- Settings Toggle: add focus-visible ring styles to switch button
- CollapsibleSection: add focus styles to anchor link heading
- tag shortcut: add focus-visible styles for interactive tags/badges
Match the search page input styling with focus-visible:ring-2
- Remove inconsistent ring-accent/50 styles, use ring-fg/50 everywhere
- Add ring-offset for proper spacing on inputs
- Use focus-ring shortcut consistently for buttons/links
- Fix header nav links, search inputs, mobile menu, modals
Was using undefined 'ring-ring' color, now uses consistent focus-ring shortcut
- Change sidebar container from overflow-hidden to overflow-clip to prevent focus ring clipping
- Add full focus rings to section header anchor links (#keywords, #compatibility, #get-started, #readme)
Increases background opacity from 10% to 90% in light mode to ensure
the download count is visible against the chart background.

Fixes npmx-dev#633
@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 2, 2026 1:00am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 2, 2026 1:00am
npmx-lunaria Ignored Ignored Feb 2, 2026 1:00am

Request Review

@JarvisInvestInsight
Copy link
Contributor Author

Closing: this PR was incorrectly branched from #650 instead of main, and the issue is also addressed by #626.

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.

Download chart tooltip is not visible in light mode

1 participant