Repository navigation
fix(testing): repair silently-skipped Next.js suites + WCAG 2.1 AA ChartWrapper contract; docs: stage-4b spec - #66
Conversation
…ble tally + voter-card.v1)
…atch, jsdom env, ResizeObserver mock
…n landmark, heading roles, status/alert semantics
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7494395160
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| testEnvironment: 'node', | ||
| testMatch: ['**/__tests__/**/*.test.ts'], | ||
| testEnvironment: 'jsdom', | ||
| testMatch: ['**/__tests__/**/*.test.ts', '**/__tests__/**/*.test.tsx'], |
There was a problem hiding this comment.
Repair stale TSX suites before enabling them
When the Jest jobs in .github/workflows/ci.yml run, this new pattern executes every previously skipped TSX suite, but those suites were not brought in sync with the current components. For example, EnhancedSimulationForm.test.tsx immediately queries “Average Weekly Income” even though that control is only mounted after selecting the Members tab, and later treats Radix sliders as clearable text inputs; these Testing Library calls throw, so both the main Jest job and the accessibility job now fail rather than merely gaining coverage. Update the stale suites (or temporarily narrow the match) before enabling all of them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 765da1b: testPathIgnorePatterns scopes this branch to the repaired suites (simulation + ChartWrapper — 39/39 local green). Form suites are repaired on stacked #67; the five framework suites target other lanes' components (Dashboard/charts) and move to a dedicated follow-up lane. CI now gates on what this branch actually repaired.
| </CardHeader> | ||
| <CardContent> | ||
| <div className={`h-[${height}px]`}> | ||
| <div className={`h-[${height}px]`} role="img" aria-label={chartLabel}> |
There was a problem hiding this comment.
Expose chart data instead of flattening it into an image
For every loaded chart, role="img" exposes this entire subtree as one image and makes the Recharts descendants—including axis labels, legends, and data labels—presentational to assistive technology. The generated accessible name contains only the title and generic description, not the plotted values or trends, and ChartWrapper accepts no summary or data-table alternative, so screen-reader users cannot obtain the information conveyed by the chart. Reference an equivalent textual/table description or otherwise expose the chart data instead of relying only on this label.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 765da1b: chart container switched from role="img" (which flattens the whole subtree into one image, hiding axis labels from AT) to role="figure" — a landmark that keeps descendants exposed. ChartWrapper tests updated to getByRole('figure'); suite green 25/25 locally.
…ed lanes, expose charts as figure landmark
8db2e46
into
PMOVES.AI-Edition-Hardened
…ure-landmark ChartWrapper
… reachability focus tests (#67) * docs(gov): recover stage-4b unlinkability design spec (tiered verifiable tally + voter-card.v1) * fix(testing): repair silently-skipped Next.js test suites — tsx testMatch, jsdom env, ResizeObserver mock * feat(ui): WCAG 2.1 AA accessibility contract for ChartWrapper — region landmark, heading roles, status/alert semantics * feat(ui): WCAG 2.1 AA accessibility contract for EnhancedSimulationForm — labeled slider inputs, validation alerts, tab landmarks * fix(testing): reachability-based focus verification honoring WAI-ARIA tablist/tabpanel composite semantics * test(ui): correct EnhancedSimulationForm suite authoring bugs — ambiguous label regexes, shift-tab off-by-one, schema drift, form-scoped tab queries * fix(ui): address review threads — fractional percent bounds, submit guard, ARIA slider keys, keyboard-reachable triggers * fix(testing): re-enable repaired form suites — #67 fixes make them pass under #66 scope
Summary
Three verified fixes discovered during the branch/PR straggler review:
1. docs(gov): recover stage-4b unlinkability design spec (16d3554)
docs/superpowers/specs/2026-08-02-stage-4b-unlinkability-design.md(tiered verifiable tally + voter-card.v1) that existed only on the stalespec/stage-4b-designbranch2. fix(testing): repair silently-skipped Next.js test suites (53550e1)
testMatchonly matched*.test.ts— 8 of 9 suites (all.tsx) were silently skippedtestEnvironment: 'node'with no DOM — 103xdocument is not defined;jest-environment-jsdomwas missing from the lockfile entirely3. feat(ui): WCAG 2.1 AA accessibility contract for ChartWrapper (7494395)
role=regionlandmark + aria-label, semantic headings,role=imgchart body with label,role=statusloading,role=alerterrors,type=button+tabIndexon retryVerification
Known remaining work (separate PRs)
docs/CHIT_INTEGRATION.md— expected by parent PMOVES.AI NATS geometry docs, currently missing