Skip to content

fix(Link): in block and inline layout, a long unbroken label such as a bare URL wraps inside its line - #11558

Merged
cixzhang merged 5 commits into
mainfrom
fix/link-long-label-wraps
Nov 13, 2026
Merged

cixzhang merged 5 commits into
mainfrom
fix/link-long-label-wraps

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In block and inline layout, a Link whose label has no break opportunity, such as a bare URL, runs past the end of a narrow column and makes the column, or the whole page at phone width, scroll sideways. useLinkify turns bare URLs in text into Links, so a message or comment with a long URL breaks the layout of a side panel or a phone screen.

Problem and solution fit

  • Why it happens: Link's root is display: inline-flex, and its label is a Text flex item. Text sets overflow-wrap: break-word, which does not lower the minimum content width, and a flex item's min-width defaults to that width, so neither the root nor the label can be narrower than the longest word. Only a Link with maxLines above 0 stopped at its container.
  • Why it matters: the label overflows its line instead of wrapping, so the content no longer fits a 320 px viewport (WCAG 2.2 1.4.10 Reflow).
  • The fix: the root stops at its container (max-width: 100%) and the label may shrink (min-width: 0), in every case, so the label wraps as plain Text does. In a flex row, a Link whose label is wider than the row is now capped at the row's width and wraps; a Link that fits looks the same. A content-sized grid or table column still grows to the label's longest word, as it does for plain Text.

Expected behavior and authority

  • component:Link FR6: the label renders inside Text.
  • component:Text FR3: without truncation, a token longer than its line wraps, so ordinary flow does not force horizontal scrolling at 320 CSS px (spec:AST-020 FR1); a flex child needs min-width: 0 from its container. Link's root is that container.

Smallest restoration

Two style values in Link.tsx: max-width: 100% on the root (moved from the truncating style, which keeps min-width: 0) and min-width: 0 on the label. No API, prop or default change. The Link record's FR6 says the root stops at its container and the label wraps, and names the new check.

Evidence

  • Reproduction before the change: the Link / Long Unbroken Label story (an anchor, a button and an external Link with a bare URL label in a 200 px column). Real Chrome, light theme, at 390 px and 1280 px wide, from the Vercel previews of the first commit (main's Link code with the new story and check) and of the fix. The column is 200 px wide and ends at x = 216.
    • Before: each Link runs past the column (anchor and button to x = 515, external to x = 529), the column scrolls sideways, and the anchor and button labels stay on one line.
    • After: each Link ends at x = 216, the column does not scroll, and the label wraps onto 3 lines, the external Link's too; its icon sits at the label's end edge, centred beside the middle line.

Each frame shows the 200 px column in block layout (an anchor, a button and an external Link, each alone in its paragraph) and in inline layout (the anchor Link inside a sentence), left to right and right to left. On every frame, before: each Link runs past the column, the column scrolls sideways, and the label stays on one line; after: each Link ends inside the column, nothing scrolls, and the label wraps onto 3 lines. In the sentence, the Link's box is atomic (inline-flex), as before, so its wrapped lines sit between the text before and after it.

Viewport, direction Before (main's Link) After (this PR)
390 px, LTR Before, 390 px ltr After, 390 px ltr
390 px, RTL Before, 390 px rtl After, 390 px rtl
1280 px, LTR Before, 1280 px ltr After, 1280 px ltr
1280 px, RTL Before, 1280 px rtl After, 1280 px rtl

The story's column is a plain block, as a chat or comment column is (third commit). In the first version of the story it was a grid, and a grid item grows to its longest word, so the paragraph around each Link was as wide as the URL and no Link could wrap; the stills were taken with the column set to block, which is what the story now renders.

  • Regression test: Link.longLabel.a11y.chromium.spec.ts asks, for each form, that the column not scroll sideways, that the Link end inside it, and that the label wrap. The first commit adds it alone; it fails there (each Link runs past the column) and passes with the fix.
  • Representative unchanged path: the Link unit tests pass (5 files, 143 tests); a Link in a line wide enough for its label keeps one line.

Scope

Components: Link

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run --project ui packages/core/src/Link: 5 files, 143 tests pass.
  • pnpm check:knowledge passes.
  • Real Chrome: see Evidence.

Owner and land path

  • Owner: fix lane 2, an agent working for @cixzhang on Astryx maintenance.
  • Land path: Draft until the automated review approves the exact head; then ready for review, CI, and merge.

A story puts an anchor, a button and an external Link with a bare URL label
in a 200 px column, and a Chromium check asks that the column not scroll
sideways, that the Link end inside it, and that the label wrap. It fails on
main: the label cannot be narrower than its longest word.
Link's inline-flex root grew to its label's longest word, and the label, a
flex item, could not shrink below it, so a bare URL ran out of a narrow
column and the page scrolled sideways. The root now stops at its container
(max-width 100%) and the label may shrink (min-width 0), so the label wraps,
as component:Text FR3 asks. The root's own min-width is unchanged, so a Link
inside a caller's flex row lays out as before. The Link record says so and
names the new Chromium check.
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 13, 2026 9:07pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 13, 2026
@astracat-bot

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 13, 2026, 11:03 PM UTC

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 50fc819

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
LinkProvider 3.8 kB (0) · 20 B CSS (0) — ✓ · ✓ · ✗
SideNavHeading 82.3 kB (+28 B) · 12.1 kB CSS (0) — — · — · —
Lightbox 145.1 kB (+21 B) · 11.9 kB CSS (0) — — · — · —
5 more components
Component Size LoC Visual · A11y · RTL
TopNavHeading 81.9 kB (+16 B) · 12.0 kB CSS (0) — — · — · —
lab/CommentComposer 159.0 kB (+15 B) · 1.9 kB CSS (0) — — · — · —
lab/Comments 367.5 kB (+12 B) · 2.5 kB CSS (0) — — · — · —
Link 56.2 kB (+11 B) · 7.1 kB CSS (0) — ✓ · ✓ · —
lab/CommentThread 360.7 kB (+10 B) · 2.4 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.52 MB packed (+146 B); no new dependencies.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 13, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026

@astracat-bot astracat-bot 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.

Changes requested: the Link style fix works in block and inline layout, but its new regression test fails on this head and the changeset claims more than the change fixes.

  • The new Link.longLabel.a11y.chromium.spec.ts fails for all three forms on this head ("the column scrolls sideways") because the LongUnbrokenLabel story's display: grid column has an auto track that grows to the URL's width before and after the change, so render that column as a block (or give the grid gridTemplateColumns: 'minmax(0, 1fr)') and confirm the spec fails on the base and passes here.
  • The title and changeset say a bare URL now wraps "inside a narrow column", and the description says Markdown's bare URLs break layouts and that a Link in a caller's flex row "lays out as before", but a content-sized grid or table column still overflows, Markdown renders plain anchors that already wrapped before this change, and an over-wide label in a flex row is now capped at the row, so narrow the wording to block and inline layout, name useLinkify (which renders Link) instead of Markdown, and describe the flex-row change.

Non-blocking: the line-count assertion counts the external icon and the hidden new-tab text as lines, and the comment above truncating still describes the cap that moved to base; see the inline notes.

Claims and files checked
  • Claim: a bare-URL label now wraps inside a narrow column (title, changeset): false as worded; true in block and inline layout, not in a content-sized grid or table column.
  • Claim: the Link stops at its container and its label may shrink (changeset): verified in Link.tsx.
  • Claim: a Link in a line wide enough for its label looks the same (changeset, description): verified; unchanged frames and measurements.
  • Claim: Markdown turns bare URLs into Links that break narrow layouts: false; Markdown renders plain anchors that already wrap.
  • Claim: the cause is the inline-flex root with a label whose minimum width is its longest word: verified.
  • Claim: before the change only a truncating Link stopped at its container: verified.
  • Claim: a Link in a caller's flex row lays out as before: false for a label wider than the row.
  • Claim: the regression test fails without the fix and passes with it: false; it fails on both.
  • Claim: the Link unit tests pass (5 files, 143 tests): verified.
  • Claim: the knowledge check passes: verified.
  • Claim: no API, prop or default change: verified.
  • Claim: the Link record's FR6 describes the fix and names the new check: verified; the check it names fails.
  • File .changeset/link-long-label-wraps.md: wording finding.
  • File apps/storybook/stories/Link.stories.tsx: story column finding.
  • File docs/specs/components/Link/Link.spec.md: FR6 sentence clear; its verification row cites the failing check.
  • File packages/core/src/Link/Link.tsx: clear, with two comment notes.
  • File packages/core/src/Link/__tests__/Link.longLabel.a11y.chromium.spec.ts: fails on this head; external line-count note.

Automated review (maintainer link)

Comment thread apps/storybook/stories/Link.stories.tsx Resolved
Comment thread .changeset/link-long-label-wraps.md Resolved
Comment thread packages/core/src/Link/Link.tsx Resolved
Comment thread packages/core/src/Link/Link.tsx Resolved
The story's column was a grid, and a grid item's minimum width is its
content's longest word, so the paragraph around each Link grew to the URL's
length and the Link had nothing narrower to stop at. A block column, as a
chat or comment column is, gives each paragraph the column's width.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f24e48f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
The changeset says the fix holds in block and inline layout, names useLinkify
as the source of bare-URL Links, says a flex row now caps an over-wide Link,
and says a content-sized grid or table column still grows. The browser check
counts only label lines, not the external icon or the hidden new-tab text,
and the comment above the truncating style describes what it still does.
@cixzhang cixzhang changed the title fix(Link): a long unbroken label, such as a bare URL, wraps inside a narrow column fix(Link): in block and inline layout, a long unbroken label such as a bare URL wraps inside its line Nov 13, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec eccffb9

@astracat-bot astracat-bot 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.

Changes requested: the Link fix works in block and inline layout and its new spec proves it (it fails without the fix and passes with it), and the code needs no change; one sentence in the description misstates the evidence.

  • The description's Evidence section says the external Link wraps onto 5 lines with its icon after the last line, but at this head it wraps onto 3 lines like the anchor and button (counted the way the new spec counts), and the icon sits at the label's end edge, centred beside the middle line (Link.tsx:71), as the description's own 390 px After image shows, so please correct that sentence.

Non-blocking: the comment above the root's maxWidth in Link.tsx is still one long sentence with three topics; see the earlier inline note.

Claims and files checked
  • Claim: in block and inline layout a bare-URL label, such as one from useLinkify, now wraps inside its line instead of making the page scroll sideways (title, changeset): verified; the new spec fails without the fix and passes here, and a paragraph goes from a 299 px overflow to three lines.
  • Claim: the Link stops at its container and its label may shrink (changeset, description): verified, Link.tsx:70, :99-101, :415.
  • Claim: in a flex row an over-wide label is capped at the row's width and wraps (changeset, description): verified; a Link alone in a 200 px row is 200 px wide on three lines.
  • Claim: a Link in a line wide enough for its label looks the same (changeset, description): verified; eight existing stories are pixel-identical and a short label keeps one line.
  • Claim: a content-sized grid or table column still grows to the label's longest word (changeset, description): verified; both still grow to 499 px.
  • Claim: useLinkify turns bare URLs into Links: verified, useLinkify.tsx:202.
  • Claim: the cause is the inline-flex root and a Text flex item whose minimum width is its longest word, because break-word keeps min-content: verified, Link.tsx:66 and Text's display styles.
  • Claim: before the change only a Link with maxLines above 0 stopped at its container: verified in the base's truncating style.
  • Claim: the overflow breaks reflow at narrow widths: verified; at 390 px the base page is 529 px wide.
  • Claim: two style values change, with no API, prop or default change: verified; the API surface comparison reports no rows.
  • Claim: the Link record's FR6 now states the behaviour and its verification row names the new check: verified.
  • Claim: before the fix the anchor and button reach x = 515 and the external Link 529, past a column ending at 216, and the anchor and button labels stay on one line: verified, same numbers.
  • Claim: after the fix each Link ends at 216, the column does not scroll and the label wraps onto 3 lines: verified.
  • Claim: the external Link wraps onto 5 lines with its icon after the last line: false; 3 lines, icon centred beside the middle line.
  • Claim: the story column is now a block, because a grid item grows to its longest word: verified, Link.stories.tsx:205; an auto grid track still grows to 499 px.
  • Claim: the regression test checks that the column does not scroll, the Link ends inside it and the label wraps, and fails without the fix: verified; 3 failed without the fix and 3 passed here.
  • Claim: the Link unit tests pass (5 files, 143 tests) and the knowledge check passes: verified.
  • Claim: no new public API, default or interaction model, and no internal context in public text: verified.
  • File .changeset/link-long-label-wraps.md: clear.
  • File apps/storybook/stories/Link.stories.tsx: clear.
  • File docs/specs/components/Link/Link.spec.md: clear; the FR6 amendment is owner-approved at this head.
  • File packages/core/src/Link/Link.tsx: clear, with one non-blocking comment-style note.
  • File packages/core/src/Link/__tests__/Link.longLabel.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

cixzhang added a commit that referenced this pull request Nov 13, 2026

@astracat-bot astracat-bot 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.

Approved pending CI: the Link fix holds, and CI has not run on this head yet because the CI workflow skips drafts; it runs once the pull request is marked ready for review.

The earlier evidence sentence about the external Link now matches what renders (three lines, icon centred at the label's end), and the new Chromium spec fails without the fix and passes with it.

  • Non-blocking: the in-a-sentence case that the title and the description's stills show is not in the committed story or spec; adding that paragraph to LongUnbrokenLabel and a fourth spec case would keep the inline claim under CI.
  • Non-blocking: the comment above the root's maxWidth in Link.tsx is still one long sentence with three topics; see the earlier inline note.
Claims and files checked
  • Claim: in block and inline layout a bare-URL label, such as one from useLinkify, now wraps inside its line instead of making the page scroll sideways (title, changeset): verified; the new spec fails on the base and passes here, and a probe wraps a Link alone in its paragraph and inside a sentence onto three lines within 200 px, in both directions.
  • Claim: the Link stops at its container and its label may shrink (changeset, description): verified, Link.tsx:70, :94-101, :415.
  • Claim: in a flex row an over-wide Link is capped at the row's width and wraps (changeset, description): verified; a Link alone in a 200 px row is 200 px wide on three lines.
  • Claim: a Link in a line wide enough for its label looks the same (changeset, description): verified; nine existing story frames are pixel-identical and a short label keeps one line.
  • Claim: a content-sized grid or table column still grows to the label's longest word (changeset, description): verified; both still grow to 499 px.
  • Claim: useLinkify turns bare URLs into Links: verified, useLinkify.tsx:202.
  • Claim: the cause is the inline-flex root and a Text flex item whose minimum width is its longest word, because break-word keeps min-content: verified, Link.tsx:66 and Text's display styles.
  • Claim: before the change only a Link with maxLines above 0 stopped at its container: verified in the base's truncating style.
  • Claim: the overflow breaks reflow at phone width: verified; at 390 px the base column and page scroll sideways.
  • Claim: the Link record says the label renders inside Text, and the Text record requires an untruncated token to wrap and a flex child's container to give it a zero minimum width: verified against both records.
  • Claim: two style values change, with no API, prop or default change: verified; the API surface comparison reports no rows.
  • Claim: the Link record's FR6 now states the behaviour and its verification row names the new check: verified.
  • Claim: before the fix the anchor and button reach x = 515 and the external Link 529, past a column ending at 216, the column scrolls, and the anchor and button labels stay on one line: verified, same numbers.
  • Claim: after the fix each Link ends at 216, the column does not scroll, and each label, the external one included, wraps onto 3 lines with the icon at its end edge centred beside the middle line: verified.
  • Claim: the stills show the block and in-sentence layouts in both directions, with each Link on one line past the column before and on 3 lines inside it after, the in-sentence box sitting between the text before and after it: verified against all eight stills and by probe; the in-sentence case is not in the committed story.
  • Claim: the story column is now a block, because a grid item grows to its longest word: verified, Link.stories.tsx:205; an auto grid track still grows to 499 px.
  • Claim: the regression spec checks that the column does not scroll, the Link ends inside it and the label wraps, and it fails without the fix and passes with it: verified; 3 failed without the fix and 3 passed here.
  • Claim: the Link unit tests pass (5 files, 143 tests) and the knowledge check passes: verified.
  • Claim: no new public API, visual representation, default or interaction model, and no internal context in public text: verified.
  • File .changeset/link-long-label-wraps.md: clear.
  • File apps/storybook/stories/Link.stories.tsx: clear, with one non-blocking coverage note.
  • File docs/specs/components/Link/Link.spec.md: clear; the FR6 amendment is owner-approved at this head.
  • File packages/core/src/Link/Link.tsx: clear, with one non-blocking comment-style note.
  • File packages/core/src/Link/__tests__/Link.longLabel.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

// A block column, as a chat or comment column is: a grid or flex item
// would grow to the URL's length before the Link could wrap.
<div style={{width: 200}}>
{(['anchor', 'button', 'external'] as const).map(form => (

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.

Non-blocking: the title and the description's stills also cover a Link inside a sentence, but this story only renders each Link alone in its paragraph, so that case is not under CI. A fourth paragraph such as Read the report at <Link …>{url}</Link> before the meeting. here, plus a fourth case in Link.longLabel.a11y.chromium.spec.ts, would lock it. It already wraps correctly with this fix.

@cixzhang
cixzhang marked this pull request as ready for review November 13, 2026 20:20

@astracat-bot astracat-bot 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.

Changes requested: the Link fix itself works, since a bare-URL label now wraps inside its line in block and inline layout and the new Chromium spec fails without the fix and passes with it, but the required lint check now fails on this pull request.

  • Found by CI: lint stops at its comment-provenance check because the new comment at packages/core/src/Link/Link.tsx:67-69 cites component:Text FR3, which the comment-provenance baseline does not allow, so drop that citation (for example: "The root stops at its container, so a label with no break opportunity, such as a bare URL, wraps inside the line.").

Non-blocking: that rewrite also brings the comment under the 25-word sentence limit, and a Link-in-a-sentence case in LongUnbrokenLabel and its spec would keep the inline-layout claim under CI.

Claims and files checked
  • Claim (changeset): in block and inline layout a bare-URL label, such as one from useLinkify, now wraps instead of making the page scroll sideways. Verified: in a 200 px column the Link ran 299 px past it (313 px with the external icon) and now wraps onto three lines inside it, alone in a paragraph, in a sentence and in body text; a 320 px page no longer scrolls.
  • Claim (changeset): the Link stops at its container and its label may shrink. Verified: Link.tsx:70, :99-101, :415.
  • Claim (changeset): in a flex row an over-wide Link is capped at the row's width and wraps. Verified: 499 px to 200 px on three lines.
  • Claim (changeset): a Link that fits its line looks the same. Verified: a short label is unchanged and eight existing Link stories render pixel-identical.
  • Claim (changeset): a content-sized grid or table column still grows to the label. Verified: both stay 499 px wide.
  • Claim (description): the cause is the inline-flex root and a flex-item label whose minimum width is its longest word, and only a truncating Link was capped before. Verified in the base and head source.
  • Claim (description): two style values and no API, prop or default change. Verified: the API surface comparison lists no change.
  • Claim (description): Text FR3 and Link FR6 govern, and the Link record now states the wrap and names the new check. Verified: Link.spec.md:20, :117, :202.
  • Claim (description): before, the Links end at x = 515 and 529 against a column that ends at x = 216; after, at 216 on three lines with the external icon beside the middle line. Verified: the same numbers in Chromium.
  • Claim (description): the stills show block and in-sentence layout, left to right and right to left. Verified in the stills; the sentence case is not in the committed story.
  • Claim (description): the new spec fails without the fix and passes with it. Verified: 3 of 3 fail on the base, 3 of 3 pass on the head.
  • Claim (description): the Link unit tests (5 files, 143 tests) and the knowledge check pass. Verified.
  • File .changeset/link-long-label-wraps.md: clear.
  • File apps/storybook/stories/Link.stories.tsx: clear (non-blocking: no in-sentence case).
  • File docs/specs/components/Link/Link.spec.md: clear.
  • File packages/core/src/Link/Link.tsx: blocking finding at lines 67-69 (lint).
  • File packages/core/src/Link/__tests__/Link.longLabel.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

Comment thread packages/core/src/Link/Link.tsx Resolved
@cixzhang
cixzhang marked this pull request as draft November 13, 2026 20:41
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 50fc819

@astracat-bot astracat-bot 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.

Approved: CI passes on this head.

The fix holds: a bare-URL Link label now wraps inside its line in block and inline layout, alone in a flex row, and on a 320 px page, while short labels, truncation and clamped text render exactly as before. The new Chromium spec passes on this head, and the same layout on main's Link overflows its column, so the spec catches a regression.

Non-blocking, both already noted inline: an in-sentence case in LongUnbrokenLabel and its spec would keep inline layout under CI, and the comment at Link.tsx:67-69 can shrink to one sentence.

Claims and files checked
  • Claim (changeset): in block and inline layout, a bare-URL label, such as one from useLinkify, now wraps instead of making the page scroll sideways. Verified: in a 200 px column main's Link runs 299 px past it (313 px with the external icon) on one line; here it wraps onto three lines inside it, alone in a paragraph and inside a sentence; a 320 px page goes from 545 px wide to 320 px.
  • Claim (changeset): the Link stops at its container and its label may shrink. Verified: Link.tsx:70, :99-101, :415.
  • Claim (changeset): in a flex row, an over-wide Link is capped at the row and wraps. Verified: 499 px to 200 px, on three lines.
  • Claim (changeset): a Link that fits its line looks the same. Verified: short and multi-word labels and nine existing Link stories render pixel-identically.
  • Claim (changeset): a content-sized grid or table column still grows to the label. Verified: both stay 499 px wide, before and after.
  • Claim (description): the cause is the inline-flex root with a flex-item label whose minimum width is its longest word, and only a truncating Link stopped at its container before. Verified in main's and this head's source.
  • Claim (description): two style values, with no API, prop or default change. Verified: the API surface comparison lists no change.
  • Claim (description): the Text reflow rule and the Link label rule govern, and the Link record now states the wrap and names the new check. Verified: Link.spec.md:20, :117, :202.
  • Claim (description): before, the Links end at x = 515 and 529 against a column ending at x = 216; after, at 216 on three lines, with the external icon beside the middle line. Verified with the same layout in Chromium.
  • Claim (description): in a sentence, the Link's wrapped lines sit between the text before and after it, left to right and right to left. Verified; this case is not in the committed story.
  • Claim (description): the new spec fails without the fix and passes with it. Verified: it passes in CI on this head, and the same layout on main's Link fails each of its three checks.
  • Claim (description): the Link unit tests (5 files, 143 tests) and the knowledge check pass. Verified.
  • File .changeset/link-long-label-wraps.md: clear.
  • File apps/storybook/stories/Link.stories.tsx: clear (non-blocking: no in-sentence case).
  • File docs/specs/components/Link/Link.spec.md: clear.
  • File packages/core/src/Link/Link.tsx: clear (non-blocking comment wording at lines 67-69).
  • File packages/core/src/Link/__tests__/Link.longLabel.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

Comment on lines +67 to +69
// The root stops at its container, and the label below can shrink. Thus
// a label with no break opportunity, such as a bare URL, wraps inside the
// line and does not push past it.

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.

Non-blocking (source comment style): the first sentence carries two topics, and "the label below can shrink" repeats the comment on label at lines 97-98, while "and does not push past it" restates "wraps inside the line". One sentence keeps the reason:

Suggested change
// The root stops at its container, and the label below can shrink. Thus
// a label with no break opportunity, such as a bare URL, wraps inside the
// line and does not push past it.
// The root stops at its container, so a label with no break opportunity,
// such as a bare URL, wraps inside the line.

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 13, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 13, 2026 22:34
@cixzhang
cixzhang merged commit 86bb955 into main Nov 13, 2026
136 checks passed
@github-actions
github-actions Bot deleted the fix/link-long-label-wraps branch November 14, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 50fc819e Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant