Skip to content

Add accessibility layer (ARIA, contrast, keyboard) to BarChart and Sparkline #15

Closed

Description

@chonilius

Problem

src/components/ui/BarChart.tsx and src/components/ui/Sparkline.tsx are custom chart primitives (no charting library dependency exists in package.json — no recharts/visx/d3/chart.js), presumably hand-rolled with SVG, used across dashboards to visualize earnings, budget distribution, and activity trends. Hand-rolled SVG charts built without an accessibility pass are near-universally inaccessible: no role/aria-label conveying the data as text, no keyboard-navigable data points, decorative-only color encoding for critical financial distinctions (e.g. budget-remaining-vs-spent) that fails for colorblind users, and no accessible fallback table. Given this is a platform where sponsors make real funding decisions and contributors track real earnings, a chart that's unreadable to a screen reader user or colorblind user is a genuine access barrier to core product functionality, not a cosmetic nice-to-have.

Why this is hard

  • Requires reading the actual SVG/rendering implementation of both components to determine current accessibility posture from scratch — there's no existing a11y layer to extend.
  • Financial bar/sparkline charts need more than a blanket aria-label="chart" — meaningful accessibility requires either a programmatically associated data table (visually hidden but screen-reader-available) or per-data-point aria-labels with real values, and deciding which pattern fits BarChart (categorical, likely budget-by-repo) vs. Sparkline (continuous trend, likely earnings-over-time) requires different treatments.
  • Color-only encoding audit: check whether BarChart's series (e.g. distributed vs. remaining budget) rely solely on the slate/emerald palette hue difference — verify contrast ratios meet WCAG AA in both light and dark mode variants, and add a non-color differentiator (pattern, label, position) where they don't.
  • Must not regress the existing visual design system — this needs to be additive (semantic markup, ARIA, hidden data tables) without changing the SVG visual output that the rest of the dark-mode-first design system was built around.
  • Keyboard/focus: if any chart element is interactive (tooltip on hover, per the "tooltip" convention common to dashboards), verify there's a keyboard-accessible equivalent (focdesable points with visible focus ring, not just :hover).

Scope

  • Add an accessible-name strategy and hidden-but-available data table (or per-point ARIA) for both BarChart.tsx and Sparkline.tsx.
  • Audit and fix color contrast in both light/dark themes for all chart states.
  • Add keyboard focus support for any hover-triggered tooltip/detail interaction.
  • Add automated accessibility checks (axe-core or equivalent) for the dashboard pages rendering these charts, wired into CI if a CI config exists, or documented as a manual QA step otherwise.

Acceptance criteria

  • Both components pass an automated accessibility audit (axe or equivalent) with zero critical/serious violations.
  • All chart data is available to a screen reader as meaningful text, verified with a real screen reader pass (VoiceOver or NVDA), not just automated tooling.
  • Any interactive chart element is fully keyboard operable with a visible focus indicator.

Activity

  1. added
    very hard
    accessibility
    help wanted
    on Jul 15, 2026
  2. added
    GrantFox OSS
    Maybe Rewarded
    Official Campaign | FWC26
    on Jul 15, 2026
  3. ranjeet150 commented on Sep 15, 2026

    @ranjeet150

    Hi maintainers,

    I would like to resolve this issue. Here is my proposed execution plan:

    • Implementation: Implement Add accessibility layer (ARIA, contrast, keyboard) to BarChart and Sparkline following the existing UI design system, accessibility standards, and responsive styling.
    • Testing: Add component unit tests verifying user interactions and rendering states.

    I can start working on this right away. Please assign!

  4. added
    Stellar Wave
    on Sep 26, 2026
  5. darkwalker2 commented on Sep 26, 2026

    @darkwalker2

    @darkwalker2 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi, I am a full stack developer I would really like to contribute on this project, as I clearly understand what is needed to be done.

    Expect results in 1-3hours

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @darkwalker2 to this issue.

  6. Darkvader-ship-it commented on Sep 26, 2026

    @Darkvader-ship-it
    Contributor

    @Darkvader-ship-it has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    hey maintainer can i work on this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Darkvader-ship-it to this issue.

  7. drips-wave commented on Sep 26, 2026

    @drips-wave

    Congratulations, @Darkvader-ship-it! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @Darkvader-ship-it: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  8. drips-wave commented on Sep 27, 2026

    @drips-wave

    This issue has been completed by @Darkvader-ship-it as part of the Stellar Wave Program's 9th Wave 🥳

    😎 @Darkvader-ship-it: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  9. removed
    Stellar Wave
    on Oct 15, 2026
  10. added
    Stellar Wave
    on Oct 15, 2026
  11. removed
    Stellar Wave
    on Oct 15, 2026
  12. added
    Stellar Wave
    on Oct 15, 2026
  13. removed
    Stellar Wave
    on Oct 15, 2026
  14. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GrantFox OSSMaybe RewardedOfficial Campaign | FWC26Stellar Waveaccessibilityhelp wantedvery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions