Skip to content

Fix accessible mobile table dialog semantics#495

Merged
BigSimmo merged 2 commits into
mainfrom
codex/responsive-accessibility-audit
Jul 11, 2026
Merged

Fix accessible mobile table dialog semantics#495
BigSimmo merged 2 commits into
mainfrom
codex/responsive-accessibility-audit

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • preserve semantic table accessibility by removing the duplicate pseudo-button wrapper around mobile clinical-table previews
  • trap keyboard focus inside the full-screen table dialog while keeping Escape dismissal and focus return
  • expose aria-expanded on the real expand button and cover semantics/focus behavior at 390px, 768px, and 1440px
  • record the completed responsive/accessibility review in the branch ledger

Verification

  • npm run verify:pr-local (not run; the narrower static, unit, and full UI gates below covered the changed surface without a production build)
  • npm run verify:ui — 132/132 Chromium tests passed
  • npm run verify:release (not run; includes provider-backed and release-only gates)
  • Runtime, GitHub Actions pins, sitemap, type-scale, lint, and TypeScript checks passed
  • Full Vitest — 1,598 passed, 1 skipped
  • Focused accessible-table Vitest — 6/6 passed
  • Focused critical/table Chromium rerun after merging current main — 4/4 passed
  • Prettier and git diff --check passed

No OpenAI, Supabase, hosted CI, or other provider-backed validation was run.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded
  • Supabase target/configuration was not changed
  • Service-role keys and private document access were not changed
  • Demo/synthetic content separation was not changed
  • Source metadata, review status, and outdated/unknown-source behavior were not changed
  • No clinical decision-support behavior or deployment classification changed

Notes

  • Review covered primary app modes at 320px, 390px, 768px, 1024px, and 1440px, plus forced-colors, reduced-motion, overflow, overlap, touch target, accessible-name, ARIA reference, heading, duplicate-ID, and contrast checks.
  • One P2 accessibility defect was confirmed and fixed. No additional high-confidence responsive or accessibility issue was reproduced.

@supabase

supabase Bot commented Jul 11, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated the mobile clinical table fullscreen dialog for keyboard focus trapping, Escape closure, expansion state semantics, and decorative icon accessibility. Expanded UI smoke coverage verifies these behaviors and records the review results.

Changes

Responsive accessibility behavior

Layer / File(s) Summary
Dialog focus management and markup
src/components/AccessibleTable.tsx
The fullscreen dialog now traps Tab focus, closes on Escape, exposes aria-expanded, scopes focus handling with a dialog ref, and marks decorative icons as hidden.
Mobile expansion verification
tests/ui-smoke.spec.ts, docs/branch-review-ledger.md
The smoke test verifies table-surface semantics, dialog focus cycling, expansion state transitions, and Escape closure; the review ledger records the checks and results.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Verification Claims ❌ Error PR description includes broad verification claims like “Runtime, GitHub Actions pins, sitemap, type-scale, lint, and TypeScript checks passed” without exact commands/check names. Rewrite every verification note as “Ran <exact command/check>: passed” or “Not run: reason” (e.g. npm run verify:ui: 132/132 passed).
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main accessibility and mobile table dialog changes in the PR.
Description check ✅ Passed The description follows the template with Summary, Verification, Clinical Governance Preflight, and Notes, and is detailed enough.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Generated And Sensitive Files ✅ Passed PASS: the full PR diff only touches a docs ledger, one TSX component, and one UI test; no secrets, keys, local artifacts, or build outputs were found.
Risky Git Or Deployment Actions ✅ Passed No changed file recommends force-push, hard reset, destructive clean, shared-branch rebase, branch deletion, or deployment without confirmation; existing docs prohibit them.
Supabase Project And Schema Safety ✅ Passed No Supabase project refs/env targets changed; the only DB change drops a redundant index, with schema/comments explaining safety and no RLS/policy modifications.
Runtime And Package Manager Integrity ✅ Passed The PR doesn't touch package manifests or lockfiles; repo still pins npm@11.17.0, Node 24.x, and engine-strict=true.
Api Route Failure Handling ✅ Passed No unsafe API-route change: the diff only trims answer payloads and adjusts proxy scoping, while answer routes already deterministically handle invalid input, auth, rate limits, empty results, and...
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/responsive-accessibility-audit
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/responsive-accessibility-audit

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/ui-smoke.spec.ts (1)

1838-1840: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert that Escape returns focus to the expand button.

The test covers dismissal and state reset but not the PR’s focus-return contract.

Proposed assertion
       await page.keyboard.press("Escape");
       await expect(surfaceDialog).toBeHidden();
       await expect(expandButton).toHaveAttribute("aria-expanded", "false");
+      await expect(expandButton).toBeFocused();

As per coding guidelines, “add or update the smallest relevant test when behavior changes.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/ui-smoke.spec.ts` around lines 1838 - 1840, Update the test around the
Escape dismissal flow to also assert that focus returns to expandButton after
surfaceDialog is hidden and aria-expanded is false. Add the smallest focused
assertion using the existing expandButton locator, preserving the current
dismissal and state-reset checks.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/ui-smoke.spec.ts`:
- Around line 1838-1840: Update the test around the Escape dismissal flow to
also assert that focus returns to expandButton after surfaceDialog is hidden and
aria-expanded is false. Add the smallest focused assertion using the existing
expandButton locator, preserving the current dismissal and state-reset checks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 68f4763d-c926-49da-aab0-444456979705

📥 Commits

Reviewing files that changed from the base of the PR and between 70ec640 and de533ac.

📒 Files selected for processing (3)
  • docs/branch-review-ledger.md
  • src/components/AccessibleTable.tsx
  • tests/ui-smoke.spec.ts

@BigSimmo
BigSimmo merged commit 7025ada into main Jul 11, 2026
15 checks passed
@BigSimmo
BigSimmo deleted the codex/responsive-accessibility-audit branch July 13, 2026 16:33
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