Repository navigation
fix(ChatSystemMessage): leave notices inside a chat log to the log - #7869
Conversation
ChatSystemMessage forced role=status on its root, including date and divider rows, while ChatMessageList is a polite role=log. A new notice then had two live owners, and dates were presented as status messages. Under spec:AST-086 FR4 the log delivers content added inside it, so the row carries no live role. The status-message contract moves the component from its bound owners to its exclusions, with the reason.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsFieldStatus (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 2 accessibility violation(s) found — 2 serious. ChatComposer - 1 issue(s)
ChatComposerInput - 1 issue(s)
Visual Regression46 of 494 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Changes requested: the fix itself is right, since ChatSystemMessage no longer carries role="status", so the ChatMessageList log is the only live owner of new notices as spec:AST-086 FR1 and FR4 require, and the new tests fail before the change and pass after it. Two small corrections are needed before approval:
- The changeset says a screen-reader user "hears a new chat notice once", a spoken-output claim that
spec:AST-009FR4 ties to real assistive-technology evidence, so please either describe the routing outcome (one live owner) or name the NVDA + Chrome and VoiceOver + Safari scenario with a release-block record. - The manifest written by
ChatSystemMessage.a11y.chromium.spec.tsstill says the root keepsrole=statusand records it inside the log (lines 919–947), so please update that prose to match the newrole: nullexpectation.
[Automated review]
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] `ChatSystemMessage` no longer forces `role="status"` on its root, in either variant, so a screen-reader user hears a new chat notice once, from the chat log, instead of from both the `ChatMessageList` log and the notice (WCAG 2.2 SC 4.1.3 Status Messages; `spec:AST-086` FR1 and FR4). Date and divider rows are no longer presented as status messages. Before, every system message was a status region inside the list's polite log; now the log owns content added inside it, and a `role` passed to the component reaches its root. Tests that found a system message by the `status` role should query it by its text instead. |
There was a problem hiding this comment.
This sentence promises a spoken outcome ("hears a new chat notice once"). spec:AST-009 FR4 ties repetition claims to real assistive-technology evidence, and the evidence in this pull request is DOM and accessibility tree only. Suggest stating the routing outcome instead, for example "so a new chat notice has one live owner, the ChatMessageList log, instead of also being its own status region", or naming the NVDA + Chrome and VoiceOver + Safari scenario with a release-block record (FR17).
| touchPoints: options.touchPoints ?? false, | ||
| role: 'status', | ||
| // No live role of its own: the chat log delivers it (spec:AST-086 FR4). | ||
| role: null, |
There was a problem hiding this comment.
The expectation is now role: null, but the manifest this spec writes still says the default variant "keeps role=status", that "the status root and separator remain", that the nested-log frame "records role=status inside ChatMessageList role=log", and lists status-inside-polite-log-unverified (lines 919–947). Please update that prose so the receipt matches what the audit now measures.
## Exact decision needed
Whether merge or stable release may wait on real assistive-technology (NVDA, VoiceOver) evidence that contributors cannot produce.
## Existing authority searched
- `spec:AST-009` (current): FR4/FR8/FR17–FR19 required an explicit trigger classification, a named real-AT matrix, a scenario, and a durable release-block record, and blocked the first stable release until real-AT receipts passed or an owner exception applied.
- Linked records that restated the block or required screen-reader checks: `spec:AST-001` (browser evidence and FR7 row), `module:Table/useTableRowStatus` AR6, `module:Table/useTableColumnResize` verification, `spec:AST-056` (browser evidence line), `spec:AST-021` (release boundary phrase), `spec:AST-086` (FR6 real-AT row and platform line), `component:FieldStatus` AR5 and its verification row, `spec:AST-020` FR6 ("real-AT contract").
- Open PRs that add release-block sections to AST-009: #7732, #7275, #7272. Under this record those sections are no longer needed.
## Decision
- No requirement gates merge or release on evidence that cannot be produced (Intent, FR17, DEC-4).
- Merge and stable release need only the unit, DOM, accessibility-tree, axe, and real-browser evidence the owning records require (FR17).
- Announcements are proved by their routing: which element or channel carries them, their text, urgency, and update count per occasion (FR4, FR19).
- Real-AT observation is recommended follow-up when an outcome depends on AT behavior, may be tracked in a public issue, and holds no pull request or release (FR1–FR6, FR18).
- A change with an AT-dependent claim says so and names its lower-layer evidence; no matrix, scenario, or release record is needed to merge (FR8).
- Evidence-layer boundaries, the representative matrix, failure handling, and durable receipts stay, scoped to when a real-AT check runs.
- The exception process (old FR23–FR26) is removed because nothing remains to except.
## Rejected alternatives
- Holding stable releases until named real-AT receipts pass: fixes for known accessibility defects stall when no contributor can run the required pairings.
## Claim scope and non-goals
Only the evidence bar for merge and release, and the status of real-AT observation. Component accessibility requirements, evidence-layer boundaries, and focus/announcement behavior stay with their owners.
## Evidence and implementation relationship
Status-announcement conformance PRs (#7869, #7870, #7871, #7892, #7900, #7910) stall on the old real-AT release-block requirement because nobody in the review loop can run NVDA or VoiceOver. No implementation is included.
## Writing rubric results
- R1 narration: none; present-tense rules throughout. The two earlier holds are described as current follow-ups.
- R2 research in the record: none.
- R3 evidence naming a change: none; the earlier hold sections that named pull requests are replaced by the facts (story names and claims).
- R4 rejected alternatives over one line or outside a decision: one per decision, one line each.
- R5 pull request or issue references remaining: none in AST-009 or the edited lines.
- R6 ruled open questions still listing options: none.
## Scope
- [x] This PR contains specification records only.
- [x] It records observable behavior and preserves equivalent internal implementations.
- [x] Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
- [x] Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
- [x] It records one intentional durable decision, not a rescue for a separable tagalong.
- [x] The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
- [x] Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
- [x] Public text and artifacts contain no internal Meta context.
## Validation
- `pnpm check:knowledge`
- Prettier
- `git diff --check`
…ot without a live role The Chromium audit's empty-content and nested-log notes still described a role=status root; they now record no root role inside the polite log. The changeset states the routing outcome (one live owner, the log) rather than spoken output.
There was a problem hiding this comment.
Recommending approval: ChatSystemMessage no longer forces role="status", so the ChatMessageList log is the only live owner of new chat notices, as spec:AST-086 FR1 and FR4 require, and the new tests fail before the change and pass after it. The changeset and the Chromium audit manifest now describe the routing outcome and the role-less root, which resolves both points raised on the previous revision. As an optional follow-up, the draft ChatSystemMessage.spec.md and internal/a11y-spec/README.md still describe the old status role.
[Automated review]
User impact
In a chat transcript, a screen-reader user can hear a new system notice ("Ana joined") twice, or out of order: once from the
ChatMessageListlog and once from the notice's own status region. Date and divider rows ("Today") are also presented as status messages. After this change the log is the notice's only live owner, and dates are ordinary transcript content.Fixes #7857
Problem and solution fit
ChatSystemMessageforcesrole="status"on its root in both variants, whileChatMessageListis a politerole="log".spec:AST-086gives every announced message exactly one owner, and makes a mounted live container the owner of content added inside it.The root no longer forces a role. A
rolepassed to the component now reaches its root like other root props.Expected behavior and authority
spec:AST-086(current):role="status"inside therole="log"list. Under FR4 the log delivers it; dividers and dates are ordinary log content."Smallest restoration
ChatSystemMessage.tsx: norole="status"on the default or divider root.ChatSystemMessage.doc.mjs: the usage text no longer says the component exposes status semantics.StatusMessage.a11y.*) movesChatSystemMessagefrom its bound status owners to its exclusions, citing FR4; its harness state and story go with it.ChatSystemMessage.a11y.chromium.spec.ts) expects no root role, and its manifest notes record no root role inside the polite log.No prop, type, or style changes.
Evidence
Chrome 156 (headless) accessibility tree, Storybook built from
main(cb489ffbcc8, no Chat or Divider change since) and from this head. Live nodes per story (role, live, inside a log):logpolite;statuspolite inside the loglogpolite onlystatuspolitestatuspolite, one inside the log;logpolitelogpolite onlyChatSystemMessage.test.tsxadds an FR4 case for each variant inside aChatMessageList(nostatus,alert,logrole oraria-liveon the row or its descendants) and checks the roots carry no role. Onmainthose cases and the updated root assertions fail.These are DOM and accessibility-tree routing checks, the evidence
spec:AST-009takes for announcement claims; no spoken-output recording is claimed.Scope
Testing
pnpm vitest run packages/core/src/Chat packages/lab/src/Chat packages/core/src/FieldStatuspnpm check:repo(commit hook).