Skip to content

Add accessible chart summaries - #507

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
JSE19:main
Jul 30, 2026
Merged

Add accessible chart summaries#507
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
JSE19:main

Conversation

@JSE19

@JSE19 JSE19 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

DS-074: Add accessible chart summaries and data-table fallback

Context
The candlestick chart (TVChartContainer) renders via Lightweight Charts canvas, which is opaque to screen readers. Assistive technology users could not discover the chart's time range, trend, latest value, or underlying sampled data.'

Changes
apps/web/src/features/trade/components/chart/TVChart.tsx

  • Added role="status" to the "Select a market" empty state so screen readers announce when no market is selected.
    apps/web/src/features/trade/components/chart/TVChartContainer.tsx
  • Accessible summary: Added VisuallyHidden region (id="chart-desc") with symbol, period, date range, latest price, and trend direction. The chart container now has role="img", aria-label, and aria-describedby pointing to the summary.
  • Data-table fallback: Added a keyboard-reachable toggle button that reveals a semantic with /
    headers (Time, Open, High, Low, Close) and up to 15 representative OHLC rows in chronological order.
  • Throttled live announcements: Integrated LiveRegion + useAnnouncer to announce price updates at a throttled cadence (max 1 per 5 seconds, mode="polite").
  • State handling: Loading, empty, and error states now have equivalent visible text with appropriate ARIA roles (status, alert). The canvas wrapper is aria-hidden when no data is available.
  • Internal helpers: getChartSummary() computes the accessible description from candle data; getRepresentativeRows() samples evenly-spaced candles to avoid giant tables.
    apps/web/src/features/trade/components/chart/TVChartContainer.test.tsx (new)
  • 16 tests covering: summary content (symbol, period, latest price, trend detection), chart role/label, data-table semantics (column headers, table elements, chronological order, toggle behavior, row limits), announcement throttling (within and after the throttle window), and loading/empty/error states.
  • Acceptance criteria met

    • Chart has accessible name, description, time range, and latest value
    • Data fallback uses semantic table headers and chronological rows
    • Live updates do not announce every tick (5 s throttle)
    • Loading, empty, and error chart states have equivalent text
    • Tests cover summary content, table semantics, and announcement throttling

    Closes DS-074: Add accessible chart summaries and data-table fallback #474

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@JSE19 is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@JSE19 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@IbrahimIjai
IbrahimIjai merged commit e83ece4 into SO4-Markets:main Jul 30, 2026
0 of 4 checks passed
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.

DS-074: Add accessible chart summaries and data-table fallback

2 participants