Skip to content

fix(testing): repair silently-skipped Next.js suites + WCAG 2.1 AA ChartWrapper contract; docs: stage-4b spec - #66

Merged
POWERFULMOVES merged 4 commits into
PMOVES.AI-Edition-Hardenedfrom
fix/nextjs-test-infra-a11y
Nov 8, 2026
Merged

POWERFULMOVES merged 4 commits into
PMOVES.AI-Edition-Hardenedfrom
fix/nextjs-test-infra-a11y

Conversation

@POWERFULMOVES

Copy link
Copy Markdown
Owner

Summary

Three verified fixes discovered during the branch/PR straggler review:

1. docs(gov): recover stage-4b unlinkability design spec (16d3554)

  • Restores the 240-line docs/superpowers/specs/2026-08-02-stage-4b-unlinkability-design.md (tiered verifiable tally + voter-card.v1) that existed only on the stale spec/stage-4b-design branch

2. fix(testing): repair silently-skipped Next.js test suites (53550e1)

  • testMatch only matched *.test.ts — 8 of 9 suites (all .tsx) were silently skipped
  • testEnvironment: 'node' with no DOM — 103x document is not defined; jest-environment-jsdom was missing from the lockfile entirely
  • ResizeObserver mock invoked callbacks with no arguments (93x TypeError cascade) plus a broken observe wrapper corrupting every call
  • Result: 19/155 → 103/155 tests passing

3. feat(ui): WCAG 2.1 AA accessibility contract for ChartWrapper (7494395)

  • Component had zero accessibility markup while its suite encoded the full contract
  • Adds: role=region landmark + aria-label, semantic headings, role=img chart body with label, role=status loading, role=alert errors, type=button + tabIndex on retry
  • Result: ChartWrapper suite 0/25 → 25/25

Verification

Suite Before After
ChartWrapper a11y 0/25 25/25 pass
Next.js full 19/155 103/155
Integrations Jest 21/21 suites unchanged pass
Flask pytest 52/52 unchanged pass

Known remaining work (separate PRs)

  • EnhancedSimulationForm a11y contract (52 defined test failures specify exactly what to build: labels, keyboard nav, validation announcements, landmarks)
  • docs/CHIT_INTEGRATION.md — expected by parent PMOVES.AI NATS geometry docs, currently missing
  • 295 Dependabot vulnerabilities flagged on default branch (13 critical, 136 high)

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T17:10:06.251357Z 7494395 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@POWERFULMOVES
POWERFULMOVES merged commit 8db2e46 into PMOVES.AI-Edition-Hardened Nov 8, 2026
13 of 14 checks passed
POWERFULMOVES added a commit that referenced this pull request Nov 8, 2026
POWERFULMOVES added a commit that referenced this pull request Nov 8, 2026
POWERFULMOVES added a commit that referenced this pull request Nov 8, 2026
… 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
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.

1 participant