Repository navigation
[Component Audit] MobileNav: the menu button keeps its link to the drawer when id is undefined, and docs list the label prop - #11621
Conversation
…ests, browser evidence, and prop docs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| MobileNav | 76.1 kB (+8 B) · 11.4 kB CSS (0) | — | ✓ · ✓ · ✗ |
| MobileNavToggle | 65.2 kB (0) · 10.8 kB CSS (0) | — | ✓ · ✓ · ✗ |
| AppShell | 97.5 kB (+27 B) · 14.3 kB CSS (0) | — | — · — · — |
2 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TopNav | 77.9 kB (+22 B) · 11.7 kB CSS (0) | — | — · — · — |
| SideNav | 121.1 kB (+2 B) · 12.2 kB CSS (0) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the id={undefined} fix, the new prop docs and the new tests hold up, but the branch needs main merged in before it can land.
- Merged into
main, Core failstscandpnpm -F @astryxdesign/core buildwith TS2339 atMobileNav.tsx:576, because #11227'sside="auto"code readsrest.idand this change movesidout ofrest, so mergemainand useidPropthere. - The description calls #11227 an open pull request that this change does not touch, and Needs Review 6 describes
side="auto"code thatmainhas already replaced, so restate both againstmain. - The title says the menu button keeps its link to the drawer, but a defined caller
idstill breaks that link inside AppShell, so qualify it with "whenidis undefined".
The new id={undefined} case fails on the base and passes at this head, and all 118 MobileNav unit tests pass here. CI has not run on this draft yet.
Claims and files checked
- Fix changeset:
id={undefined}keeps AppShell's drawer id and the toggle link, and a definedidstill replaces it. Verified (MobileNav.tsx:499,:714;MobileNavContract.test.tsx:110fails on the base, passes here). - Docs changeset: six prop entries are added,
labelexplains its fallback name, and the Chinese docs droprequiredonisOpenandonOpenChange. Verified (MobileNav.doc.mjs:130-163,:231-240,:267-298,:386-392). - One runtime change; everything else is tests, docs, a browser spec and two changesets. Verified.
- The component record is unchanged. Verified.
- The new tests cover the heading, Close button and navigation region, the target and side state, the standalone id,
ref, the name order, theonClickcancel, and the toggle's rendering, name,labelandchildren. Verified (14 cases pass). - The new id test is red before the fix and green after. Verified.
- Each listed mutation fails its case. Verified by reading each assertion.
- A defined
idstill replaces the drawer id, per the existing pass-through test. Partly: that test is standalone only (MobileNav.test.tsx:160). - The record's untested rows now have tests. Partly: a defined
idinside AppShell, theside="auto"resolution andxstyleforwarding are still untested. - #11227 is open, and this change touches none of its lines. False: #11227 is on
main, and this change breaks itsrest.idread. side="auto"picks by physical half, and #11227 is changing it. Stale againstmain.- A caller
aria-labelis dropped and a calleronCancelnever runs. Verified (MobileNav.tsx:730-739). - The browser spec checks the open drawer, the accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions, and the width cap. Verified by reading; not run.
- 14 receipts and 18 frames. Consistent with the spec's cases; not run.
- The MobileNav, theming-target and layer-dismissal suites, Core's typecheck and lint pass. Verified at this head; Core's typecheck fails once
mainis merged in. - No rendered change. Verified.
- Title: the menu button keeps its link to the drawer. Broader than the fix.
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: finding (collides withrest.idonmain).packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear (not run).
…anslated prop docs reach readers; audit spec checks edge and tree in every open case
There was a problem hiding this comment.
Changes requested: the id={undefined} fix now merges cleanly with main, and the translated prop docs and new tests hold up; one wording fix remains.
- The title says the menu button keeps its link to the drawer, but a defined caller
idstill replaces AppShell's drawer id (MobileNav.tsx:731), so retitle it to say "whenidis undefined", keeping the[Component Audit] MobileNav:prefix.
The new id={undefined} case fails on the base and passes at this head, Core typechecks and builds, and astryx component MobileNav --zh and --dense now show the translated rows. CI has not run on this draft yet.
Claims and files checked
- Fix changeset:
id={undefined}keeps AppShell's drawer id and the toggle link, and a definedidstill replaces it. Verified (MobileNav.tsx:501,:731;MobileNavContract.test.tsx:110fails on the base and passes here;MobileNav.test.tsx:160-176). - Docs changeset: six prop entries are added and the
labelentry explains its fallback name. Verified (MobileNav.doc.mjs:130-163,:270-301,:384-390). - The Chinese and dense prop text sat where the doc compiler ignores it for a doc with two components, and now reaches readers. Verified (the doc compiler's overlay code; the component command shows English rows on the base and translated rows here).
- The Chinese text no longer marks
isOpenandonOpenChangeas required, and inside AppShell they come from context. Verified (MobileNav.doc.mjs:233-243;MobileNav.tsx:508). - There is one runtime change; everything else is tests, docs, a browser spec and two changesets. Verified (the opener lookup reads the same value as before).
- The component record is unchanged. Verified.
- #11227 merged before this base, and its opener lookup now reads the caller's id from the destructured prop. Verified (
MobileNav.tsx:576). - The new tests cover the heading, Close button and navigation region, the target and side state, the standalone id,
ref, the name order and non-string header, theonClickcancel, and the toggle's rendering, default name,labelandchildren. Verified (14 cases pass). - The new id test is red before the fix and green after. Verified on the current base.
- Each listed mutation fails its case. Verified by reading each assertion.
xstyleand a definedidinside AppShell remain untested. Verified.- A caller
aria-labelis dropped and a calleronCancelnever runs. Verified (MobileNav.tsx:749,:756). - The record still describes the
undefinedgap, the oldside="auto"gap, and rows these tests now cover. Verified. - The browser spec checks the open drawer, the accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions, and the width cap. Verified by reading; not run.
- 14 receipts and 18 frames. Consistent with the spec's cases; not run.
- The local browser run used an earlier commit with the same tree as this head. Not verified: that commit is not in the repository history.
- The MobileNav, theming-target and layer-dismissal suites, Core's typecheck and strict lint pass. Verified at this head.
- No rendered change. Verified.
- Title: the menu button keeps its link to the drawer. Broader than the fix.
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear (not run).
There was a problem hiding this comment.
Approved pending CI: the id={undefined} fix, the translated prop docs and the new tests hold up, and the title now matches what the fix covers. CI has not finished on this head yet.
The new id={undefined} case fails on the base and passes here, Core typechecks, astryx component MobileNav --zh and --dense now show the translated rows, and the browser audit spec passed in this head's accessibility run. A defined caller id still disconnects the toggle inside AppShell, which the description already leaves to an owner decision.
Claims and files checked
- Title: the menu button keeps its link to the drawer when
idis undefined, and the docs listlabel. Verified (MobileNav.tsx:731;MobileNav.doc.mjs:130-135). - Fix changeset:
id={undefined}keeps AppShell's drawer id and the toggle link, and a definedidstill replaces it. Verified (MobileNav.tsx:501,:731;MobileNavContract.test.tsx:110-123fails on the base and passes here). - Docs changeset: six prop entries are added and the
labelentry explains its fallback name. Verified (MobileNav.doc.mjs:130-163,:270-301,:384-390). - The Chinese and dense prop text sat where the doc compiler ignores it for a doc with two components, and now reaches readers. Verified (the doc compiler's overlay code; the component command prints English rows on the base and translated rows here).
- The Chinese text no longer marks
isOpenandonOpenChangeas required, and inside AppShell they come from context. Verified (MobileNav.doc.mjs:233-243;MobileNav.tsx:508). - There is one runtime change; everything else is tests, docs, a browser spec and two changesets. Verified (the opener lookup at
MobileNav.tsx:576reads the same value as before). - The component record is unchanged. Verified.
- The earlier
side="auto"fix landed before this base, and its opener lookup now reads the destructured id. Verified (MobileNav.tsx:576). - The new tests cover the heading, Close button and navigation region, the target and side state, the standalone id,
ref, the name order and non-string header, theonClickcancel, and the toggle's rendering, default name,labelandchildren. Verified (14 cases pass). - The new id test is red before the fix and green after. Verified on the base.
- Each listed mutation fails its case. Verified by reading each assertion.
xstyleand a definedidinside AppShell stay untested, and the droppedaria-labelandonCancelstay open. Verified.- A caller
aria-labelis dropped and a calleronCancelnever runs. Verified (MobileNav.tsx:749,:756). - The record still describes the
undefinedgap, the oldside="auto"gap, and rows these tests now cover. Verified. - The browser spec checks the open drawer, the accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions, and the width cap. Verified by reading; it passed in this head's accessibility run.
- 14 receipts and 18 frames. Verified (7 cases and 9 frames per color mode).
- The local browser run used an earlier commit with the same tree, and before and after frames are identical. Not verifiable here; consistent with no rendered change.
- The MobileNav, theming-target and layer-dismissal suites, Core's typecheck and strict lint pass. Verified at this head.
- The Close button is 32 px. Verified (the default element size token).
- The axe and right-to-left audits run in this head's CI. Verified (both jobs passed; seven MobileNav stories, no issues).
- No rendered change. Verified.
- Audit scores. A self-assessment, not a code claim.
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
There was a problem hiding this comment.
Changes requested: the id={undefined} fix, the translated prop docs and the new tests hold up, and the title now matches what the fix covers, but one CI test fails because of the new label doc entry.
- Found by CI:
packages/cli/test/core-prop-docs.test.mjsfails because the newlabelentry fixes the drift thatpackages/cli/test/core-prop-docs.known-drift.json:25still lists, so delete that line from the list.
The new id={undefined} case fails on the base and passes here, Core typechecks, and the browser audit spec passed in this head's accessibility run. The first Node test shard also stopped at its time limit with no failing test, so it needs a rerun.
Claims and files checked
- Title: the menu button keeps its link to the drawer when
idis undefined, and the docs listlabel. Verified (MobileNav.tsx:731;MobileNav.doc.mjs:130-135). - Fix changeset:
id={undefined}keeps AppShell's drawer id and the toggle link, and a definedidstill replaces it. Verified (MobileNav.tsx:501,:731;MobileNavContract.test.tsx:110-123fails on the base and passes here). - Docs changeset: six prop entries are added and the
labelentry explains its fallback name. Verified (MobileNav.doc.mjs:130-163,:270-301,:384-390). - The Chinese and dense prop text sat where the doc compiler ignores it for a doc with two components, and now reaches readers. Verified (the doc compiler's overlay code; the component command prints English rows on the base and translated rows here).
- The Chinese text no longer marks
isOpenandonOpenChangeas required, and inside AppShell they come from context. Verified (MobileNav.doc.mjs:233-243;MobileNav.tsx:508). - There is one runtime change; everything else is tests, docs, a browser spec and two changesets. Verified (the opener lookup at
MobileNav.tsx:576reads the same value as before). - The component record is unchanged. Verified.
- The earlier
side="auto"fix landed before this base, and its opener lookup now reads the destructured id. Verified (MobileNav.tsx:576). - The new tests cover the heading, Close button and navigation region, the target and side state, the standalone id,
ref, the name order and non-string header, theonClickcancel, and the toggle's rendering, default name,labelandchildren. Verified (14 cases pass). - The new id test is red before the fix and green after. Verified on the base.
- Each listed mutation fails its case. Verified by reading each assertion.
xstyleand a definedidinside AppShell stay untested, and the droppedaria-labelandonCancelstay open. Verified.- A caller
aria-labelis dropped and a calleronCancelnever runs. Verified (MobileNav.tsx:749,:756). - The record still describes the
undefinedgap, the oldside="auto"gap, and rows these tests now cover. Verified. - The browser spec checks the open drawer, the accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions, and the width cap. Verified by reading; it passed in this head's accessibility run.
- 14 receipts and 18 frames. Verified (7 cases and 9 frames per color mode).
- The local browser run used an earlier commit with the same tree, and before and after frames are identical. Not verifiable here; consistent with no rendered change.
- The MobileNav, theming-target and layer-dismissal suites, Core's typecheck and strict lint pass. Verified at this head; the CLI's prop-drift test fails (finding).
- The Close button is 32 px. Verified (the default element size token).
- The axe and right-to-left audits run in this head's CI. Verified (both jobs passed; seven MobileNav stories, no issues).
- No rendered change. Verified.
- Audit scores. A self-assessment, not a code claim.
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/core/src/MobileNav/MobileNav.doc.mjs: finding (the newlabelentry leaves a stale entry in the prop-drift list).packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
There was a problem hiding this comment.
Approved pending CI: the id={undefined} fix, the translated prop docs and the new tests hold up, and the stale MobileNav.label entry is gone from the known prop-doc drift list, so that docs test now passes. The heavy test, build and docsite suites have not run on this head yet; they run before merge.
Claims and files checked
Claims
- Fix changeset: an
undefinedid keeps AppShell's drawer id, so the toggle'saria-controlsstill names the drawer; a defined id still replaces it. Verified:MobileNav.tsx:731;MobileNavContract.test.tsx:110fails before the fix and passes after;MobileNav.test.tsx:160keeps the defined-id pass-through. - Docs changeset: the prop docs list
label,xstyle,className,style,refanddata-testid, andlabelsays what names the drawer when unset. Verified:MobileNav.doc.mjs:130-163, matching the name order the component and its tests use. - Docs changeset: the Chinese and dense prop text now reaches readers, because it sat where the doc compiler ignores it for a doc with two components. Verified:
astryx component MobileNav --zhand--denseprint English rows on the base and the translated rows here. - Docs changeset: the Chinese text no longer marks
isOpenandonOpenChangeas required. Verified:MobileNav.doc.mjs:234-243and the CLI output. - The only runtime change is the
undefinedid case, and theside="auto"opener lookup reads the same destructured value. Verified:MobileNav.tsx:501,:576,:731. - 14 new unit cases cover the contract rows the record lists as untested. Verified: 14 cases in
MobileNavContract.test.tsx, all passing; on the base only theundefinedid case fails. - The browser audit spec checks the open drawer, its accessibility tree (except in the backdrop case), focus, Escape and backdrop closes, focus return, the end side in both directions and the width cap (331.5 px at 390, 272 px at 320). Verified by reading
MobileNavAudit.a11y.chromium.spec.ts; its 14 receipts and 18 frames match its case list. MobileNav.labelleaves the known prop-doc drift list, as that test requires. Verified:core-prop-docs.test.mjspasses here.- The audit score moves from 89.6 to 92.8. Verified as arithmetic from the section weights and scores.
- The author's local browser run was at an earlier commit with the same files. Unverified: that commit is not in the branch history; the same spec passed in CI on the previous revision, whose files match this head apart from the drift list.
- The remaining open items (a defined caller
id, a calleraria-label, a calleronCancel, the drawer theme target, reduced motion, the layer runtime, and the record follow-up) stay open. Verified against the MobileNav record's Current-state impact and open question.
Files
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/cli/test/core-prop-docs.known-drift.json: clear; the deleted line matches the newlabeldoc entry.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
…wn-drift keeps both removals) main removed MoreMenu.isMenuOpen from core-prop-docs.known-drift.json beside this branch's MobileNav.label removal; both lines stay removed.
|
/approve-spec e3989dd |
There was a problem hiding this comment.
Approved pending CI: the id={undefined} fix keeps the menu button's link to the drawer, the new and translated prop docs match the component, and the new tests pass. CI has not run on this head yet because the pull request is a draft; it runs once the pull request is marked ready for review, and it has to pass before merge. A defined caller id still disconnects the toggle, as the description already notes.
Claims and files checked
Review mode: full; reason: recipe-changed (many rules)
Claims
- Fix changeset and title: an
undefinedid keeps AppShell's drawer id, so the toggle'saria-controlsstill names the drawer, and a defined id still replaces it. Verified:MobileNav.tsx:731;MobileNavContract.test.tsx:110fails on the base and passes here;MobileNav.test.tsx:165keeps the defined-id pass-through. - Docs changeset and title: the prop docs list
label,xstyle,className,style,refanddata-testid, andlabelsays what names the drawer when it is unset. Verified:MobileNav.doc.mjs:130-163againstMobileNav.tsx:725-756. - Docs changeset: the Chinese and dense prop text now reaches readers, because it sat where the doc compiler ignores it for a doc with two components. Verified:
astryx component MobileNav --zhand--denseprint the English rows on the base and the translated rows here, also when merged withmain. - Docs changeset: the Chinese text no longer marks
isOpenandonOpenChangeas required. Verified:MobileNav.doc.mjs:234-243; both props are optional inMobileNavProps. - There is one runtime change; everything else is tests, docs, a browser spec, one drift-list entry and two changesets. Verified against the diff:
MobileNav.tsx:501,:576,:731. - The automatic-side opener lookup reads the caller's id from the same destructured prop. Verified:
MobileNav.tsx:576; the auto-side suites pass, including the hydration case that passes a caller id. - The new unit cases cover the contract rows the record lists as untested. Verified: the 14 cases in
MobileNavContract.test.tsxpass; on the base only theundefinedid case fails. - The browser audit spec checks the open drawer, its accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions and the width cap. Verified by reading
MobileNavAudit.a11y.chromium.spec.ts; it was not run here, and its CI leg passed on the previous revision with the same MobileNav files. - The MobileNav folder and the doc-literal, doc-reference, theming-target and layer-dismissal suites pass. Verified here (629 cases at this head, after the merge of
main). MobileNav.labelleaves the known prop-doc drift list, as that test requires. Verified:core-prop-docs.test.mjspasses here and merged withmain.- The component contract is unchanged. Verified: the diff changes no knowledge record.
- The audit score moves from 89.6 to 92.8 and the open fixes from nine to six. Verified as arithmetic from the section weights and scores.
- The earlier CI run failed only because a
test-nodeleg was cancelled. Verified from the previous revision's check runs. - The author's local browser run and its byte-identical before and after frames. Unverified: that run was at a commit outside the branch history.
- The remaining open items (a defined caller
id, a calleraria-label, a calleronCancel, the drawer theme target, reduced motion, the layer runtime and the record follow-up) stay open. Verified against the record's Current-state impact and open question. - No rendered change. Verified: the only runtime change is the dialog's
id.
Files
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.packages/cli/test/core-prop-docs.known-drift.json: clear; the removed line matches the newlabelrow.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
With an undefined caller id the dialog keeps the drawer id, so the Current-state bullet no longer says "even undefined". A defined caller id still replaces the drawer id and disconnects the Toggle inside AppShell, so the gap stays.
|
/approve-spec 30e5bb2 |
There was a problem hiding this comment.
Changes requested: the id={undefined} fix, the new and translated prop docs and the new tests hold up, and the description's eligibility report now matches this revision, but one line of the description still misstates the record change.
- The audit block's "Component contract: existing
MobileNav.spec.md(authority: current), unchanged" line contradicts this revision, which edits the record's Current-state impact bullet (MobileNav.spec.md:89-90), and the description's own eligibility report, which now says the contract changed: reword that line to name the edited bullet.
Nothing else blocks. The record's "Read from source, with no focused test yet" list (MobileNav.spec.md:288-304) and its FR8 text still lag the new tests, and could move here since this revision already edits the record. CI has not run on this revision because the pull request is a draft.
Claims and files checked
Review mode: same-head; reason: none
Claims
- Fix changeset and title: an
undefinedid keeps AppShell's drawer id, so the toggle'saria-controlsstill names the drawer; a defined id still replaces it. Verified:MobileNav.tsx:731;MobileNavContract.test.tsx:110-123fails on the base and passes here;MobileNav.test.tsx:165-174keeps the defined-id pass-through. - Docs changeset: the prop docs list
label,xstyle,className,style,refanddata-testid, andlabelsays what names the drawer when it is unset. Verified:MobileNav.doc.mjs:130-163againstMobileNav.tsx:495-503and:724-726. - Docs changeset: the Chinese and dense prop text now reaches readers, because it sat where the doc compiler ignores it for a doc with two components. Verified:
packages/cli/foundation/doc-compiler/overlays.mjs:187-193;astryx component MobileNav --zhand--denseprint English rows on the base and translated rows here. - Docs changeset: the Chinese text no longer marks
isOpenandonOpenChangeas required. Verified:MobileNav.doc.mjs:234-243; both props are optional inMobileNavProps. - The docs changeset bumps Core and the CLI. Verified.
- There is one runtime change; everything else is tests, docs, a browser spec, one drift-list entry and two changesets. Verified against the diff (the record line counted as docs).
- The automatic-side opener lookup reads the caller's id from the same destructured prop. Verified:
MobileNav.tsx:576. - The record's untested contract rows now have tests. Verified: the 14 cases in
MobileNavContract.test.tsxpass; on the base only theundefinedid case fails. Not rerun: the per-case mutation checks. - The browser audit spec checks the open drawer, its accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions and the width cap. Verified by reading
MobileNavAudit.a11y.chromium.spec.ts; it has not run on this revision. - The MobileNav folder and the doc-literal, doc-reference, theming-target and layer-dismissal suites pass, with Core typecheck and lint. Verified on this revision: 630 tests pass with the CLI prop-doc test; typecheck and ESLint on the changed files are clean.
MobileNav.labelleaves the known prop-doc drift list, as that test requires. Verified:core-prop-docs.test.mjspasses.- The audited head is this revision, with
mainmerged and the record bullet corrected since the audit run, and MobileNav's code, docs and tests unchanged since then. Verified: the only later changes to the pull request's files are the record bullet andmain's removal of a MoreMenu drift line. - The audit's base is the commit the audit run started from. Verified: it is the merge base of the audited commit with
main. - The component contract is unchanged. False:
MobileNav.spec.md:89-90changes at this revision. - The eligibility report names this revision, says the contract changed in its Current-state impact, and records the spec-owner approval. Verified: the record diff and the engineering owner's approval comment for this revision.
- The audit score moves from 89.6 to 92.8 and the open fixes from nine to six. Verified as arithmetic from the section weights and scores.
- The earlier CI run failed only because a
test-nodeleg was cancelled. Verified: that run's only non-passing checks are the cancelledtest-node (1/5)leg and thetestgate over it. - The author's local browser run and its byte-identical before and after frames. Unverified: that run was at a commit outside the branch history.
- The open items (a defined caller
id, a calleraria-label, a calleronCancel, the drawer theme target, reduced motion, the layer runtime) stay open. Verified against the record's Current-state impact and open question. - The record now says a defined caller
idreplaces the drawer id, while its FR8 text and verification map stay as they were. Verified:MobileNav.spec.md:89-90,:150,:288-304. - The edited record bullet meets the writing rubric (present tense, no narration, cites its basis). Verified:
MobileNav.spec.md:89-93. - #11839 merges after this one. Verified that #11839 is open and covers dense prop text in docs whose props live on their components.
- No rendered change. Verified: the only runtime change is the dialog's
id.
Files
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.docs/specs/components/MobileNav/MobileNav.spec.md: clear; the edit matches the fix, but the description's audit block says the record is unchanged (finding above).packages/cli/test/core-prop-docs.known-drift.json: clear; the removed line matches the newlabelrow.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
There was a problem hiding this comment.
Approved pending CI: the id={undefined} fix keeps the menu button's link to the drawer, the new and translated prop docs match the component, and the new contract tests and browser audit spec pass. Some test-node shards were still running at review time, and they must pass before merge.
Nothing blocks. The record's "Read from source, with no focused test yet" list (MobileNav.spec.md:288-304) and its FR8 text still lag the new tests, and could move in a later record edit.
Claims and files checked
Review mode: same-head; reason: none
changed rules (1): Whatever the scope, these are computed over the whole pull request… — checked: both review recipes, this pull request's review history and its files, no finding
Claims
- Fix changeset and title: an
undefinedid keeps AppShell's drawer id, so the toggle'saria-controlsstill names the drawer; a defined id still replaces it. Verified:MobileNav.tsx:731;MobileNavContract.test.tsx:110-123fails on the base and passes here and merged into currentmain;MobileNav.test.tsx:160-178keeps the defined-id pass-through. - Docs changeset: the prop docs list
label,xstyle,className,style,refanddata-testid, andlabelsays what names the drawer when it is unset. Verified:MobileNav.doc.mjs:130-163against the component's props and naming code. - Docs changeset: the Chinese and dense prop text now reaches readers, because it sat where the doc compiler ignores it for a doc with two components. Verified:
packages/cli/foundation/doc-compiler/overlays.mjs:187-200(unchanged on currentmain); the dense and Chinese prop output prints the translated rows here and merged into currentmain(where the Chinese rows show with--props). - Docs changeset: the Chinese text no longer marks
isOpenandonOpenChangeas required. Verified:MobileNav.doc.mjs:233-243; both props are optional (MobileNav.tsx:407,:416). - The docs changeset bumps Core and the CLI; the fix changeset bumps Core. Verified.
- There is one runtime change; everything else is tests, docs, a browser spec, one drift-list entry and two changesets. Verified against the diff (the record line counted as docs).
- The automatic-side opener lookup reads the caller's id from the same destructured prop. Verified:
MobileNav.tsx:576. - The record's untested contract rows now have tests. Verified: the 14 cases in
MobileNavContract.test.tsxpass; on the base only theundefinedid case fails. Not rerun: the per-case mutation checks. - The browser audit spec checks the open drawer, its accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions and the width cap, in 14 receipts and 18 frames. Verified: CI ran it on this revision and every receipt passed.
- The MobileNav folder and the doc-literal, doc-reference, theming-target and layer-dismissal suites pass, with Core typecheck and lint. Verified: they pass here and merged into current
main(the count grows withmain's new cases); CI's typecheck and lint pass on this revision. MobileNav.labelleaves the known prop-doc drift list, as that test requires. Verified:core-prop-docs.test.mjspasses here and merged into currentmain.- The audited revision has
mainmerged and the record bullet corrected since the audit run, with MobileNav's code, docs and tests unchanged since then. Verified from the branch history. - The audit's base is the commit the audit run started from. Verified: it is the merge base of the audited commit with
main. - The component contract's Current-state impact bullet now names only a defined caller
id, with a spec-owner approval at this revision. Verified:MobileNav.spec.md:89-90and the engineering owner's approval comment for this revision. - The eligibility report names this revision, says the contract changed, and records the spec-owner approval. Verified.
- The audit score moves from 89.6 to 92.8 and the open fixes from nine to six. Verified as arithmetic from the section weights and scores.
- The earlier CI run failed only because a
test-nodeleg was cancelled. Verified: that run's only non-passing jobs are the cancelledtest-node (1/5)leg and thetestgate over it. - The earlier automatic-side fix merged before this base, and its opener lookup now reads the same destructured
id. Verified: it is in the base history;MobileNav.tsx:576. - The author's local browser run and its byte-identical before and after frames. Unverified: those runs were at commits outside the branch history; CI's run on this revision passes.
- The right-to-left and accessibility measurements come from CI's touched-components and accessibility runs. Verified: both passed on this revision.
- The open items (a defined caller
id, a calleraria-label, a calleronCancel, the drawer theme target, reduced motion, the layer runtime) stay open. Verified against the record at this revision;mainhas since given the drawer panel its own theme target. - The record's FR8 text and verification map still lag the code and tests. Verified:
MobileNav.spec.md:150,:288-304. - The edited record bullet meets the writing rubric (present tense, no narration, cites its basis). Verified:
MobileNav.spec.md:89-93. - No rendered change. Verified: the only runtime change is the dialog's
id.
Files
.changeset/mobile-nav-audit-docs.md: clear..changeset/mobile-nav-undefined-id.md: clear.docs/specs/components/MobileNav/MobileNav.spec.md: clear; the narrowed gap line matches the fix and the description.packages/cli/test/core-prop-docs.known-drift.json: clear; the removed line matches the newlabelrow.packages/core/src/MobileNav/MobileNav.doc.mjs: clear.packages/core/src/MobileNav/MobileNav.tsx: clear.packages/core/src/MobileNav/MobileNavContract.test.tsx: clear.packages/core/src/MobileNav/__tests__/MobileNavAudit.a11y.chromium.spec.ts: clear.
User impact
A screen-reader user inside an AppShell no longer loses the link between the menu button and the navigation drawer when an app passes
id={undefined}to MobileNav: the dialog keeps AppShell's drawer id, so MobileNavToggle'saria-controlsstill names the drawer. A defined calleridstill replaces it, as before, and still leaves the Toggle pointing at nothing (Needs Review 1).Builders reading MobileNav's prop docs now find
label, the prop that names the drawer, plusxstyle,className,style,ref, anddata-testid. Builders who read the Chinese or dense docs now see MobileNav's translated prop text: it was written where the doc compiler does not read it for a doc with two components, so they saw the English. The Chinese text no longer marksisOpenandonOpenChangeas required; inside AppShell the drawer reads them from context.Most contract rows the record lists as "read from source, with no focused test" now have tests: the dialog's heading, Close button, and navigation region; the
mobile-navtarget and itssidestate; a standalone dialog's own id; the forwardedref;label, a calleraria-labelledby, and non-string header content in the name; a calleronClickthat cancels the backdrop close; and MobileNavToggle's rendering conditions, default name,label, andchildren. A browser audit spec now checks the open drawer, its accessibility tree, focus, Escape and backdrop closes, focus return, the end side in both directions, and the width cap.Audit result
core/MobileNav(released in@astryxdesign/coreunder./MobileNav)1.16.621ab9a7eb1a30e5bb2ca8a35d65449a0bf4e336ceae86682b6c(main merged and the record's Current-state bullet corrected since the audit run ate954b494; MobileNav's code, docs and tests are unchanged since then)MobileNav.spec.md(authority: current); its Current-state impact bullet now names only a defined callerid, with a spec-owner approval at this revision. No observational backfill was prepared.idofundefinedno longer replaces the drawer id. Everything else is tests, docs, a browser evidence spec, one entry removed from the CLI's known prop-doc drift list, and two changesets ([fix],[docs]).side="auto"keep the drawer on the opener's inline side (FR8). Its opener lookup now reads the caller'sidfrom the same destructured prop this fix adds.idinside AppShell leaves the Toggle'saria-controlsnaming nothing (AR3);undefinedno longer doesmobile-navwith itssidestate on the dialog, the backdrop is--color-overlaywith no blur (FR13). Open FIX: Needs Review 4idofundefinedno longer replaces the drawer id (architecture:public-component-apiINV5). Open FIXes: Needs Review 1, 2, and 3xstyleon the dialog and a defined calleridinside AppShell, which records a gap; the browser spec adds accessibility-tree, focus, and close evidencelabeland the styling,ref, and test-id props missing from the prop docs (X5b); the Chinese and dense prop text never reached readers, and the Chinese text markedisOpenandonOpenChangeas requiredside="end"opens at the left in right-to-left and the right in left-to-right;side="auto"follows the opener's inline side since #11227 (FR8)§11 is not run for an existing core component.
Why the score moved: the §6 FIX closes with the tests and the two §8 FIXes close with the docs. The
idfix narrows the §3 caller-idFIX but does not close it. Six FIXes stay open.Pre-fix score: scored from base source before any change. Night Watch records only the landed post-fix result in the score ledger, so the pre-fix score lives here.
Findings fixed
idofundefinedreplaced the drawer id, so inside AppShell the Toggle'saria-controlsnamed no elementarchitecture:public-component-apiINV5;component:AppShellFR13; the record's Current-state impactidonly when it is defined. A new test is red before the fix and green after. A definedidstill replaces the drawer id (the existing standalone pass-through test; Needs Review 1)xstyleon the dialog, and a defined calleridinside AppShell, which records a gapMobileNavContract.test.tsx. Mutation checks: a string header that is not a heading, nosidestate, a shared fixed id, a droppedref, an ignoredlabel, a droppedaria-labelledby, dropped non-string header content, an ignored callerpreventDefault, a Toggle that renders above the mobile layout or when disabled, a wrong default name, and ignoredchildreneach fail their caselabel,xstyle,className,style,ref, anddata-testidmissing from the prop docsMobileNav.labelleavescore-prop-docs.known-drift.json, as that test requires once the drift is goneisOpenandonOpenChangeas requiredrequiredremoved.astryx component MobileNav --zhand--densenow show the translated rows,labelincludedNeeds Review
iddisconnects the Toggle (open FIX, §3). Inside AppShell a calleridreplaces the drawer id, so MobileNavToggle'saria-controlsnames no element (component:AppShellFR13, AR3; INV5). Whether the dialog keeps AppShell's id or the Toggle follows the caller's is an API decision.aria-labelis dropped (open FIX, §3). MobileNav's own name replaces it.architecture:public-component-apiINV5 has supported ARIA inputs reach the element, but where a calleraria-labelranks againstlabeland a string header is a naming decision.onCancelnever runs (open FIX, §3). Composing it with the drawer's own cancel handling (INV5, INV7) needs a decision on whether a caller'spreventDefaultmay keep the drawer open on Escape.design:reduced-motionDR2 and DR3 want no travel and, for a fine pointer, no animated property. The touch cross-fade is a design choice.architecture:layer-runtimeINV14; a runtime migration, not an audit fix.idreplaces the drawer id (it said "evenundefined", which this PR fixes); a defined calleridstill disconnects the Toggle inside AppShell, so that bullet stays. Beyond that, FR8 still describes the physical-half gap that fix(MobileNav): side="auto" resolves the drawer edge in RTL and on first open #11227 closed, and the verification map still lists the rows these tests now cover. A later owner-approved record change can update them.Writing rubric results
Applies to the one edited passage, the "A caller
iddisconnects the Toggle" bullet incomponent:MobileNavCurrent-state impact.R1 narration: none. The bullet states what a defined caller
iddoes today, in the present tense.R2 research: none.
R3 evidence: none changed. The bullet cites
component:AppShellFR13 and AR3 andarchitecture:public-component-apiINV5, not a change.R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.
R7 project status: none. The bullet is a requirement gap that stays open for a defined
id.Owner and land path
test-nodeleg was cancelled; every other leg passed.Evidence
MobileNavAudit.a11y.chromium.spec.tsopens MobileNav stories by clicking their opener, in light and dark, both directions, at 390 px and 320 px. Every frame has a receipt bound to the Storybook build and checkout: story id, theme, mode, direction, viewport, DPR 2, settled fonts, and no page errors. Each line below is a check that fails the receipt when it does not hold:Default, the backdrop case,End Side,Without Title,Custom Width): the dialog is open and:modal, focus is inside it, the backdrop is a dim with opacity 1 and nobackdrop-filter, and the drawer sits flush to the inline edge itssidenames; except in the backdrop case, Chromium's accessibility tree has one modal dialog and one navigation landmark, both with the expected name;Default: the drawer is 320 px; the heading and first item meet WCAG AA; Tab from the drawer reaches Close, which is:focus-visiblewith a focus ring and at least 24 px each way; Escape closes the dialog and focus returns to the opener;Default): a click inside the drawer leaves it open; a click on the page strip closes it;End Side:data-side="end", at the right in left-to-right and the left in right-to-left;Without Title: the default name, and no heading;Custom Width:width={360}caps at 85% of the viewport (331.5 px at 390, 272 px at 320) with no sideways scroll.b27992d65cf, with a Storybook built from that commit.b27992d65cfhas the same Core, Storybook, and spec files as the exact head (the branch was then rebuilt as a merge of main instead of a rebase, and the exact head also dropsMobileNav.labelfrom the CLI's known prop-doc drift list); exact-head CI is the authoritative run.65ed0c0171c(the base before fix(MobileNav): side="auto" resolves the drawer edge in RTL and on first open #11227 landed, plus the spec); all 14 receipts passed. All 18 frames are byte-identical atb27992d65cf.MobileNavContract.test.tsxcases; the MobileNav folder plus the doc-literal, doc-reference, theming-target, and layer-dismissal suites pass (626 cases, including the auto-side suites from fix(MobileNav): side="auto" resolves the drawer edge in RTL and on first open #11227). Core typecheck and strict lint pass.MobileNav / Default, which the exact-head Touched components check runs, and by the right-to-leftEnd Sideframes above.id.pr-a11yrun is the measurement.Closed evidence inventory
MobileNav,MobileNavProps,MobileNavToggle,MobileNavTogglePropsMobileNav/index.tsMobileNav.doc.mjsarchitecture:public-component-apiMobileNav.tsxisOpen,onOpenChange, AppShell stateMobileNav.tsxisOpen,onOpenChange(zh fixed)MobileNav.tsxonOpenChangeMobileNav.tsxonOpenChangesideMobileNav.tsxsideEnd Sideframes, both directions;Defaultopens at the endwidthMobileNav.tsxwidthCustom Widthframeslabel,header, nameMobileNav.tsxlabel(new),headerDefault,Without TitleframesMobileNav.tsxref,id,className,style,xstyle,data-testid,...restMobileNav.tsxid={undefined}, andrefcases (3 new), pass-through casesid,aria-label, andonCancelopen (Needs Review 1–3)MobileNavToggleMobileNavToggle.tsxchildren,labelFR10 eligibility report
{ "schema": "astryx.audit-eligibility/v1", "component": "MobileNav", "package": "core", "mode": "night-watch", "rubricVersion": "1.16.6", "repository": {"base": "67ecef13885", "head": "30e5bb2ca8a35d65449a0bf4e336ceae86682b6c"}, "contract": {"id": "component:MobileNav", "authority": "current", "changed": true, "change": "Current-state impact: the caller-id gap names only a defined id"}, "inventory": {"closed": true, "rows": 11}, "remediations": [ {"id": "INV5", "kind": "bug-fix", "evidence": "red-then-green unit case (undefined id only)"}, {"id": "V3-V5", "kind": "behavior-test", "evidence": "14 unit cases with mutation checks; browser audit spec receipts"}, {"id": "X5b", "kind": "doc-drift", "evidence": "six prop entries in each doc variant"}, {"id": "X5", "kind": "doc-drift", "evidence": "zh and dense prop text moved where the compiler reads it; zh required flags removed"} ], "unresolved": { "objective": [], "manual": ["defined caller id disconnects the Toggle", "caller aria-label precedence", "caller onCancel composition", "drawer theme target (OQ1)", "reduced-motion presentation", "layer-runtime migration (INV14)", "record FR8 and verification map follow-up"] }, "approvals": {"specOwner": "/approve-spec at 30e5bb2c"}, "verdict": {"autoMergeEligible": false, "reasons": ["AST-029 FR11 activation has not shipped", "open manual items"]} }