Repository navigation
fix(core): name labeled Dividers; single Spinner label announcement - #4370
Merged
Merged
Conversation
bhamodi
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
July 26, 2026 04:49
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis ReportModified ComponentsChat
Divider
Spinner
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Chat - 1 issue(s)
Generated by PR Enrichment workflow | View full report |
cixzhang
approved these changes
Jul 30, 2026
cixzhang
enabled auto-merge (squash)
July 30, 2026 06:10
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two content-component accessibility minors from a11y scan #3:
Dividerrendered its label as a child of therole="separator"node, but a separator does not derive its accessible name from its content, so the label was never exposed as the separator's name. The separator now references the label element viaaria-labelledby(works for both string and arbitrary JSX labels). An explicit consumeraria-label/aria-labelledbytakes precedence.ChatSystemMessage'svariant="divider"benefits automatically since it renders<Divider label={children} />.label, the innerrole="status"span keptaria-labelset to the same string that the siblingTextrendered, so screen readers announced the label twice. The status element is now named from the visibleTextviaaria-labelledbywhen a string label renders without an explicitaria-label;aria-labelis preserved when no visible label exists (default "Loading"), for ReactNode labels, and when explicitly provided.Changes
packages/core/src/Divider/Divider.tsx— adduseId-basedaria-labelledbywiring from the separator to the rendered label element; explicitaria-label/aria-labelledbywin.packages/core/src/Spinner/Spinner.tsx— when a visible string label renders (and no explicitaria-label), droparia-labelfrom therole="status"span and name it viaaria-labelledbypointing at the visibleText; updated thelabelprop JSDoc.packages/core/src/Divider/Divider.test.tsx— accessible-name tests: string label, ReactNode label, unlabeled (noaria-labelledby), explicitaria-labelprecedence.packages/core/src/Spinner/Spinner.test.tsx— status named from visible label with no duplicatearia-label; default/explicitaria-labelbehavior unchanged.packages/core/src/Chat/ChatSystemMessage.test.tsx— divider variant separator has the children as its accessible name..changeset/a11y-content-minors.md— patch changeset.Test plan
aria-label).node_modules/.bin/vitest run packages/core/src/Divider packages/core/src/Spinner packages/core/src/Chat --reporter=dot— 18 files, 197 tests passed.node_modules/.bin/vitest run packages/core --reporter=dot— 222 files, 5164 tests passed (no flakes this run).node_modules/.bin/tsc --project packages/core/tsconfig.json --noEmit— clean.prettier --checkandeslinton changed files — clean.node scripts/check-changesets.mjs— 45 changesets valid.Notes