feat: add accessible data table alternative - #1035
Merged
ayomideadeniran merged 2 commits intoAug 3, 2026
Merged
Conversation
|
@Stanley-Owoh is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@somotochukwu-dev 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! 🚀 |
Contributor
|
pr under review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add accessible data-table alternatives for all chart-heavy analytics and performance views, ensuring every chart exposes the same information through semantic summaries and keyboard-operable data tables.
Changes
src/components/analytics/ChartDataTable.tsx(new)Reusable accessible data table component. Renders a semantic
<table>with:<caption>(visually hidden viasr-onlyclass) providing a table description<thead>with<th scope="col">for column headers<tbody>rows with formatted valuesformatfunctions per columnidprop foraria-controlslinkage from toggle buttonsChart components updated (6 files)
Each chart in
src/components/analytics/now:<div role="img" aria-label="...">with a descriptive summary of what the chart shows<button>witharia-expandedandaria-controls) to show/hide the data tableChartDataTablewith the same data as the chart when the toggle is activatedFiles:
ProgressChart.tsx— Line chart: button witharia-controls="progress-chart-table", shows date/completed/inProgress/notStartedCompletionPie.tsx— Pie chart: button witharia-controls="completion-pie-table", shows category/percentageSkillRadar.tsx— Radar chart: button witharia-controls="skill-radar-table", shows skill/levelTrendChart.tsx— Composed chart: button witharia-controls="trend-chart-table", shows week/score/velocityTimeDistributionChart.tsx— Area chart: button witharia-controls="time-distribution-table", shows hour/sessionsStudyHeatmap.tsx— Custom heatmap: button witharia-controls="study-heatmap-table", shows date/activities; individual cells haverole="gridcell"andaria-labelsrc/components/performance-metrics/PerformanceMetricsDashboard.tsxUpdated the existing Time Spent bar chart and Completion Rate pie chart with:
aria-labelvalues on theirrole="img"containersaria-expanded/aria-controlsfor each chartChartDataTableinstances showing matching dataTest files (new)
src/components/analytics/__tests__/ChartDataTable.test.tsx— 8 unit tests:scope="col"src/components/analytics/__tests__/ChartAccessibility.test.tsx— 14 unit tests across 5 chart components:role="img"with descriptivearia-labelaria-expandedandaria-controlsAcceptance criteria coverage
role="img"+aria-label)<button>witharia-expanded/aria-controls)Closes #931