[pending ParakhAI-frontend#442] test: mobile nav dialog accessible name - #16
saqibmanan wants to merge 1 commit into
Conversation
…end#442)
Sheet.Content (opub-ui) only renders a DialogTitle when given a title
prop. The mobile hamburger menu's Sidebar never passed one, so the open
dialog's auto-generated aria-labelledby pointed at an id that was never
in the DOM, leaving it with no accessible name (axe: aria-dialog-name).
Gated with pending_pr("ParakhAI-frontend#442") so it skips until that PR
merges. The PR's other half (a branded 404 page) isn't covered here: the
app's middleware treats '/' as the only public path, so any other URL
redirects to sign-in before not-found.tsx can render, for an anonymous
visitor on dev or a local build alike.
|
CI is red on Test Summary, but not because of this PR's diff (which only adds This PR's new test behaved correctly: The actual failure is pre-existing and unrelated: That test is decorated I did not push a fix into this PR: removing/updating someone else's Proposed patch (for a separate PR, not this one): drop the Generated by Claude Code |
Pending: covers open CivicDataLab/ParakhAI-frontend#442 (head
24db653). Skipped in CI until it merges. Safe to merge before it.Source PR
CivicDataLab/ParakhAI-frontend#442 — "fix: add branded 404 page and fix mobile menu accessible name" (open, base
dev, created 2026-07-31, >72h old, no existing coverage).What behaviour changes
Two independent fixes in one PR:
app/not-found.tsx(new): a branded 404 page replacing the bare default Next.js 404.components/layout/Sidebar.tsx:Sheet.Content(opub-ui, built on Radix) now receivestitle="Navigation menu". Per the PR body,Sheet.Contentonly renders Radix'sDialogTitlewhen given atitleprop — without it, the dialog's auto-generatedaria-labelledbypointed at an id that was never in the DOM, so the open mobile menu had no accessible name.Category chosen
accessibility(axe-core scan of the open mobile menu) for fix #2. No category added for fix #1 — see "Not covered" below.Red → green → skip proof
1. Collection under CI's real filter (
pytest tests/accessibility/ -m "accessibility"): the new test collects (35 items total, test present).2. RED — marker stripped, run against
dev.parakh.civicdataspace.in(current/unmerged behaviour):Confirmed directly before writing the assertion: opening the mobile menu on dev and running axe-core gives
violations: ['aria-dialog-name', 'button-name', 'color-contrast']—aria-dialog-name(impact "serious") is exactly the bug this PR fixes; the other two are pre-existing and out of scope.3. GREEN — marker stripped, PR head (
24db653) served locally (next dev, dev's GraphQL API, stub Keycloak/NextAuth env since the homepage itself needs no session):Confirmed directly:
aria-labelledbynow resolves to an element whose text is"Navigation menu", andaria-dialog-nameis no longer in axe's violation list (['button-name', 'color-contrast']only).4. Marker restored — re-ran against dev, confirmed the same
SKIPPED ... pending_pr ParakhAI-frontend#442: not merged yetas step 1.Not covered — and why
middleware.tssetspublicPages = ['/']— literally every other path, including one that matches no route, requires auth and 307s to/api/auth/signinbefore Next.js's router ever resolvesnot-found.tsx. Verified both against dev and against a local build of the PR head:curlto a nonexistent path returns307to sign-in on both, never the 404 content. This isn't a credentials gap I can route around — an authenticated session is structurally required to reach the page at all, so there's nothing for this cloud routine (or any unauthenticated check) to prove. UNVERIFIED — not written, no credentialed session available in this environment to even attempt a red run. A human (or the local/pr-test-syncsession, which has real test credentials) should log in, confirm/some-nonexistent-pathnow renders the branded 404 instead of the Next.js default, and add that as its own test once #442 merges.readonly: not applicable yet — the feature isn't onmain/prod. Follow-up once #442 ships there.Known edge (per pr-test-sync skill §9)
Merged isn't deployed: if
dev's deploy fails its smoke gate after #442 merges and rolls back, this test will go red against the old page — that's a real signal, not a flake.