Skip to content

fix(Field): label, description and status text, the status tooltip included, keep their written order on right-to-left pages - #11220

Merged
cixzhang merged 24 commits into
mainfrom
fix/field-mixed-direction-text
Nov 21, 2026
Merged

cixzhang merged 24 commits into
mainfrom
fix/field-mixed-direction-text

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

User impact

This affects people who read a right-to-left page (Arabic, Hebrew, Persian, Urdu) where a form field's label, description or status message holds caller text with weak or neutral characters.

  • Today: the characters reorder. A label Prefix https:// shows as //:Prefix https, and +3 shows as 3+. Every input that renders a Field shows this, InputGroup included.
  • After this change: plain text with no right-to-left letter lays out left to right, so it reads in the order it was written.
  • Unchanged: text that contains a right-to-left letter keeps the page's direction, so example.com موقع still reads right to left. On a left-to-right page the span changes nothing visible, because the text already lays out left to right. No API change.

Expected behavior and authority

design:bidirectionality DR2: caller text keeps a readable character order. The same rule already covers InputGroupText, Badge and Token, through the internal textDirection helper. This change applies that helper to the Field's own caller text.

Problem and solution fit

  • One fix, in Field: FieldLabel (the label and its description), Field's horizontal-labels description, and FieldStatus each put plain left-to-right text in an inner span dir="ltr". The span sits inside the existing element, so the label's alignment, its optional or required marker and the status glyph still follow the page.
  • No direction read: whether the span is added depends only on the text. Plain text with no strong right-to-left letter gets it on every page, as InputGroupText, Badge and Token already do. It is inert on a left-to-right page and works under any right-to-left region, including a page that sets dir="rtl" without InternationalizationProvider. An empty label or status message gets no span, so it keeps no text line.
  • One helper: withTextDirection in utils/textDirection.ts adds the span, with one rule for empty text. FieldLabel (label and description), Field's horizontal-labels description, FieldStatus, InputGroupText and the status tooltip of statusVariant="tooltip" (TextInput through useInputStatusIcon, Selector and MultiSelector) all call it. architecture:internationalization INV11 names the helper.
  • Wrapped lines keep the container's alignment: the span takes its parent's alignment with text-align: match-parent, which resolves start and end in the parent's direction. So a wrapping label lines up on the page's side, and a label in a centred container stays centred. Chromium supports only the -webkit-match-parent keyword, so the rule writes both; WebKit originated -webkit-match-parent and supports match-parent (not run here: no WebKit on the capture machine).
  • MultiSelector's searchable bottom sheet: its listbox is named from label, as the sheet without search already was. With the label text one level down, the trigger behind the modal sheet no longer named it in Chromium. The listbox name is the label alone, without the required or optional marker: component:Selector AR1 says "In every presentation the listbox's accessible name is the field's label (label)", and a new component:MultiSelector AR1 states the same, with the required state kept on the field's control (the combobox trigger's aria-required, or with search the trigger's name). The default popover is unchanged from main: it still names its listbox through the trigger, which MultiSelector AR1 now records as a gap, because the closed popover listbox stays in the DOM and naming it by label would give getByLabelText('Fruit') two matches; that fix belongs with mounting the popover listbox only while open.
    Authority: component:Selector AR1 says "In every presentation the listbox's accessible name is the field's label (label)", and MultiSelector's AR1 follows it by name, so the open sheet's list is named "Fruit", not "Fruit Required". MultiSelector's required rule keeps the required state on the field's control, out of the list's name: with hasSearch the closed trigger states it in its accessible name, and the search input carries aria-required while the list is open.
  • Tests that read text: 23 existing tests that found a visible label, description or status by its text now take the element around the span, because the text sits one level down: 22 in core (including FieldLabel.test.tsx's label-colour test, which came in with main) and RichTextEditor's label test. This is a test change, not a user-facing one.
  • Accessible name and description: unchanged. The span adds no text.

Verification

  • Unit (Field.test.tsx, red first): under a dir="rtl" region, Prefix https:// as label, description and status sits in a dir="ltr" span, and the field's accessible name and description stay Prefix https://. example.com موقع gets no span. A left-to-right page gets the same span. An empty status message gets no span. The first case fails on main.
  • Tooltip (red first): under a dir="rtl" region, TextInput.test.tsx puts a tooltip-placement status message Prefix https:// in a dir="ltr" span and checks that the input's accessible description stays Prefix https://; Selector.test.tsx and MultiSelector.test.tsx check that the tooltip message -42 items sits in a dir="ltr" span. Each fails before its fix.
  • Listbox name (MultiSelector.test.tsx): a bottom-sheet listbox, with and without search, is named "Fruit", and a required field keeps its required state on the trigger (aria-required on the combobox, or "Required" in the searchable trigger's name), never in the listbox name.
  • Wrapped label (MixedDirectionText.a11y.chromium.spec.ts): at 390 px, each line of the story's wrapping label meets the label's start edge, under RTL and LTR, and in a centred container each line stays centred.
  • Searchable sheet (MultiSelector.test.tsx, red first): a searchable bottom sheet's listbox is named "Fruit". It fails before the fix.
  • Real layout (MixedDirectionText.a11y.chromium.spec.ts): a new Field Mixed Direction story adds the label, description and status to the shared spec that reads each character's rendered position under RTL and LTR.
  • Suites: every component folder that renders Field (24, including CheckboxList, Tokenizer, DateInput and PowerSearch): 174 files, 5,332 tests pass. After the empty-text fix, Field and FieldStatus pass 194 of 194. Core tsc, ESLint and check:knowledge pass. At an earlier head (808e743): the helper, Field, FieldStatus, TextInput, Selector, InputGroup, CheckboxInput, CheckboxList and Switch ran 1,107 tests in 48 files, and MultiSelector ran 284 tests in 5 files, all passing. At d9958d0 (after merging main at f58e644): FieldLabel.test.tsx and MultiSelector.test.tsx passed 268 of 268, and check:knowledge passed. At this head (3450d89, after merging main at eafcbfe, which adds three MultiSelector list-format tests): the MultiSelector, Field, Selector, PowerSearch, i18n, utils, Badge, Token, InputGroup and CheckboxList suites pass 3,406 of 3,406, and the PR's Chromium a11y and interaction specs pass 29 of 29 and 12 of 12; the full pre-merge check runs before this leaves draft. CheckboxInput.test.tsx is unchanged from main.
  • Real Chrome stills (RTL): Chrome 157, the Field Mixed Direction story with the page set to RTL, light theme. These were taken before this PR merged main, comparing d8fe0d9, an earlier head of this PR, with 9600e35, its merge base then; later stills follow below. Before: the same story on the components at 9600e35 (the story is the only added change). Each field shows its label, its description, then a detached status.
Width Before After
1280 px Before, desktop After, desktop
390 px Before, phone After, phone

Before, https:// reads //:https, .com reads com., +3 reads 3+ and @alice reads alice@ in the label, the description and the status. After, all three read as written. iPhone جديد and example.com موقع look the same on both sides.

  • Real Chrome still (LTR): the same story with the page set to LTR, 1280 px, light theme. Before: d8fe0d9, whose left-to-right markup matches main. After: e99387f, an earlier head, which adds the span on LTR too. The two PNGs are byte-identical: no visible change.
Before (LTR, 1280 px) After (LTR, 1280 px)
Before, LTR desktop After, LTR desktop
Case Before After
(a) TextInput with a wrapping plain-Latin label Before, wrapped label After, wrapped label
(a2) The same label in a container that centres its text Before, centred After, centred
(b) TextInput status tooltip -42 items Before, TextInput tooltip After, TextInput tooltip

(a) and (a2) check that the fix moves no wrapped text: each before and after frame is byte-identical. The glyphs sit at the same places on both sides (first line x = 35 to 374 and wrapped line x = 161 to 374 in (a); x = 26 to 364 and x = 88 to 302, centred, in (a2)). On the head, a range over the label also reports the inner span's first-line box, which starts at the label's edge (x = 16); that box paints nothing. (b) Before, the tooltip reads items 42-. After, it reads -42 items, as written.

Writing rubric results

Records changed: component:Field (FR10, its verification row, verified_by, and the two compatibility lines that name the inner span), component:MultiSelector (AR1 and its verification row), and architecture:internationalization (the INV11 line naming utils/textDirection.ts, with applies_to and verified_by).

  • R1 narration: none. FR10 states the behavior in the present tense.
  • R2 research: none.
  • R3 evidence naming a change: none. The verification row names tests and a story.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none.
  • R6 open questions: none added.
  • R7 project status: none.

Hidden labels

A label hidden with isLabelHidden keeps its text as written: it has no visual order, so FieldLabel adds no left-to-right span to it or to its description. Field FR10, its verification row and the changeset state this exception. Unit tests cover it, and the tests that read a hidden label or description (in CheckboxInput, Field, InputGroup and Switch) and CheckboxList's row tests read that text directly again, as on main. The browser check CheckboxListPress.a11y.chromium.spec.ts finds a row's label as its first text span with no children; with the span on CheckboxList's hidden checkbox label it found that hidden text first and pressed beside the box. That locator depends on the row's DOM order, so pointing it at the visible label explicitly would make it sturdier; that is a separate test change, not part of this pull request.

Scope

Field, FieldLabel, FieldStatus and InputGroupText source; the status tooltip in useInputStatusIcon, Selector and MultiSelector; MultiSelector's searchable-sheet listbox name; the utils/textDirection.ts helper; the Field record, the component:MultiSelector record (its AR1) and the architecture:internationalization INV11 line; the Field story; the shared mixed-direction browser spec; tests that read text; and a patch changeset.

(Posted by Cindy's agent on her behalf.)

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.

@vercel

vercel Bot commented Nov 11, 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 21, 2026 10:21am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 11, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@astracat-bot

astracat-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 1:50 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d8fe0d9

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 156ff1b

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
InputGroup 63.4 kB (+275 B) · 8.9 kB CSS (+23 B) — — · ✗ · —
Tokenizer · Storybook 112.8 kB (+38 B) · 21.9 kB CSS (+24 B) 2,680 (0) — · ✗ · —
Badge 🔴 7.2 kB (+2.8 kB) · 4.1 kB CSS (+32 B) — — · — · —
67 more components
Component Size LoC Visual · A11y · RTL
CheckboxList 75.0 kB (+310 B) · 8.1 kB CSS (+24 B) — — · ✓ · —
CheckboxListItem 82.2 kB (+302 B) · 12.6 kB CSS (+26 B) — — · — · —
DateTimeInput 232.2 kB (+297 B) · 20.6 kB CSS (+30 B) — — · — · —
NumberInput 106.4 kB (+296 B) · 13.1 kB CSS (+27 B) — — · — · —
Pagination 153.5 kB (+296 B) · 20.1 kB CSS (+25 B) — — · — · —
Slider 116.5 kB (+295 B) · 9.2 kB CSS (+26 B) — — · — · —
FileInput 77.7 kB (+290 B) · 12.8 kB CSS (+27 B) — — · — · —
lab/AudioPlayer 233.6 kB (+316 B) · 1.8 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 315.4 kB (+316 B) · 454 B CSS (0) — — · — · —
lab/MediaSeekButton 223.5 kB (+312 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 223.5 kB (+312 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 223.5 kB (+311 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 223.5 kB (+309 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 223.5 kB (+309 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 223.5 kB (+309 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 223.5 kB (+309 B) · 1.5 kB CSS (0) — — · — · —
CheckboxInput 71.2 kB (+281 B) · 10.6 kB CSS (+27 B) — — · — · —
Selector 120.3 kB (+285 B) · 19.7 kB CSS (+23 B) — — · ✓ · —
Switch · Storybook 111.3 kB (+283 B) · 10.5 kB CSS (+25 B) 1,784 (0) — · ✓ · —
lab/EmojiPicker 121.2 kB (+308 B) · 751 B CSS (0) — — · — · —
lab/MediaTimeSlider 223.5 kB (+308 B) · 1.5 kB CSS (0) — — · — · —
RadioListItem 78.3 kB (+279 B) · 11.2 kB CSS (+28 B) — — · — · —
Field 61.3 kB (+286 B) · 7.6 kB CSS (+20 B) — — · ✓ · —
RadioList 62.8 kB (+283 B) · 7.7 kB CSS (+23 B) — — · ✓ · —
lab/ListInput 97.4 kB (+306 B) · 922 B CSS (0) — — · — · —
TimeInput 180.5 kB (+279 B) · 17.9 kB CSS (+25 B) — — · — · —
FieldStatus · Storybook 10.7 kB (+269 B) · 3.7 kB CSS (+34 B) 165 (+2) — · ✓ · —
TextArea · Storybook 94.8 kB (+277 B) · 10.0 kB CSS (+26 B) 509 (0) — · ✓ · —
lab/ChatReactionBar 129.2 kB (+303 B) · 1.1 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 128.0 kB (+302 B) · 773 B CSS (0) — — · — · —
lab/TransferListSelector 151.2 kB (+302 B) · 1.4 kB CSS (0) — — · — · —
TextInput · Storybook 101.4 kB (+273 B) · 12.8 kB CSS (+27 B) 416 (0) — · ✓ · —
lab/VideoPlayer 231.2 kB (+300 B) · 2.1 kB CSS (0) — — · — · —
ComplexSelector 83.9 kB (+271 B) · 13.2 kB CSS (+26 B) — — · — · —
DateInput 208.3 kB (+264 B) · 18.9 kB CSS (+27 B) — — · — · —
ListItem 81.3 kB (+265 B) · 12.6 kB CSS (+26 B) — — · — · —
lab/TransferList 139.3 kB (+286 B) · 1.2 kB CSS (0) — — · — · —
DateRangeInput 106.3 kB (+257 B) · 14.2 kB CSS (+26 B) — — · — · —
lab/SelectableCardGroup 71.7 kB (+280 B) · 162 B CSS (0) — — · — · —
FieldLabel 57.1 kB (+244 B) · 6.1 kB CSS (+27 B) — — · ✓ · —
richtext/RichTextEditor 311.0 kB (+262 B) · 2.7 kB CSS (0) — — · — · —
Markdown 208.6 kB (+182 B) · 23.4 kB CSS (+37 B) — — · — · —
PowerSearch 318.2 kB (+114 B) · 27.3 kB CSS (+24 B) — — · — · —
Typeahead 94.9 kB (+96 B) · 14.4 kB CSS (+40 B) — — · — · —
MultiSelector · Storybook 109.0 kB (+96 B) · 18.9 kB CSS (+25 B) 2,772 (+4) — · ✓ · —
lab/CommentThread 381.3 kB (+119 B) · 2.4 kB CSS (0) — — · — · —
lab/Comments 388.4 kB (+113 B) · 2.5 kB CSS (0) — — · — · —
richtext/RichTextView 287.6 kB (+112 B) · 2.4 kB CSS (0) — — · — · —
lab/TabBarMoreList 104.2 kB (+88 B) · 1.8 kB CSS (0) — — · — · —
InputGroupText 7.0 kB (+33 B) · 3.9 kB CSS (+34 B) — — · — · —
lab/CommentComposer 186.5 kB (+62 B) · 1.9 kB CSS (0) — — · — · —
Token 30.1 kB (+11 B) · 5.0 kB CSS (+32 B) — — · — · —
ChatComposerDrawer 18.4 kB (+6 B) · 4.8 kB CSS (+35 B) — — · — · —
ChatTokenizedText 7.6 kB (+6 B) · 4.1 kB CSS (+31 B) — — · — · —
ChatComposerInput 87.8 kB (+9 B) · 12.5 kB CSS (+27 B) — — · — · —
ChatComposerTokenElement 87.8 kB (+9 B) · 12.5 kB CSS (+27 B) — — · — · —
ChatComposer 90.7 kB (+3 B) · 13.5 kB CSS (+27 B) — — · — · —
TableCell 106.3 kB (0) · 20.2 kB CSS (+27 B) — — · — · —
ContextMenu 105.1 kB (0) · 19.6 kB CSS (+26 B) — — · — · —
TableHeaderCell 106.1 kB (0) · 20.0 kB CSS (+26 B) — — · — · —
DropdownMenu 113.2 kB (0) · 19.8 kB CSS (+23 B) — — · — · —
MoreMenu 113.4 kB (0) · 19.8 kB CSS (+23 B) — — · — · —
Table 124.1 kB (−1 B) · 21.1 kB CSS (+24 B) — — · — · —
ChatToolCalls 34.5 kB (−7 B) · 8.8 kB CSS (+25 B) — — · — · —
FormLayout · Storybook 6.9 kB (0) · 3.5 kB CSS (0) 102 (0) — · ✓ · —
SelectorOption 24.6 kB (0) · 6.8 kB CSS (0) — — · — · —
lab/DiffViewer 95.8 kB (−1 B) · 2.1 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.92 MB packed (+1.5 kB); no new dependencies.

Wide change (12 components): add ci:run-visual for Visual, ci:run-rtl for RTL.

Accessibility: 2 violation(s)

Accessibility Audit

Status: 2 accessibility violation(s) found — 2 serious.

InputGroup - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/26 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Tokenizer - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 2/32 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | View full report

@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 label, description and status box now read as written under a right-to-left provider, but four issues need fixing first.

  • An empty status message now renders an empty <span dir="ltr"> under right-to-left (FieldStatus.tsx:226), which makes the FieldStatus audit count a text line for the empty fixtures and fails the required test check; returning nothing for an empty string in textDirectionProps fixes every caller.
  • The span is added only when useDirection() returns rtl (FieldLabel.tsx:304, Field.tsx:243, FieldStatus.tsx:225), which architecture:internationalization INV11 rules out, so a dir="rtl" region under a left-to-right provider still shows //:Prefix https while a Badge beside it reads correctly; applying the helper on every page, as Badge, Token and InputGroupText do, removes the gate.
  • With statusVariant="tooltip" the message reaches the icon tooltip unwrapped (useInputStatusIcon.tsx:229) and still reads //:Prefix https, although FR10 and the changeset promise the fix for the status message; wrap it too or narrow both texts.
  • The read-and-wrap logic is copied into FieldLabel.tsx, Field.tsx and FieldStatus.tsx beside InputGroupText's own wrap; one wrap helper in utils/textDirection.ts that each site calls keeps later fixes in one place.

Please add tests for the empty message, a DOM-only right-to-left region and the tooltip placement.

Automated review (maintainer link)

Comment thread packages/core/src/Field/FieldLabel.tsx Resolved
Comment thread packages/core/src/Field/Field.tsx Resolved
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 12:45
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 12:46
@cixzhang

Copy link
Copy Markdown
Contributor Author

/revoke-spec d8fe0d9

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
…t, Badge and Token do

The direction span no longer depends on the provider's direction. Plain
caller text with no right-to-left letter gets the inner dir="ltr" span on
every page: it is inert on a left-to-right page and keeps the written order
under any right-to-left region, including a page that sets dir="rtl" without
the provider. Tests that found a label, description or status by its text now
take the element around the span.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 19:26
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 19:27
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e99387f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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 label, description and status box now keep their written order on right-to-left pages, and FR10 is approved for this head, but five issues need fixing first.

  • The inner span renders on every page, so RichTextEditor.test.tsx:410 (which takes getByText('Notes') as the label) fails in the required test-ui job; take .parentElement there as the updated core tests do.
  • FR10 and the changeset promise the status message, but with statusVariant="tooltip" the message reaches the icon tooltip unwrapped (hooks/useInputStatusIcon.tsx:229), so it still reorders; wrap it the same way and add a test, or narrow FR10 and the changeset to the message box with a new approval.
  • The read-and-wrap is copied into FieldLabel.tsx (twice), Field.tsx and FieldStatus.tsx beside the one InputGroupText.tsx already has, and the copies already differ on empty text; move it into one helper in utils/textDirection.ts that all five sites call.
  • The changeset says left-to-right pages are unchanged, but the span changes what a text query returns on every page, and the description's suite list leaves out richtext, which fails; reword both.
  • Miss: the Field record still says it makes no DOM change (Field.spec.md:48 and :61), while FR10 adds the inner span; update both lines.

The empty-message audit failure and the provider-direction gate from the earlier review stay fixed. The theme-palette.test.mjs timeout in test-node is in a CLI test this change does not reach.

Claims and files checked
  • Claim: plain text with weak characters used to reorder on right-to-left pages in every Field-based input, InputGroup included — verified (the base renders the text directly; InputGroup.tsx renders Field).
  • Claim: such text now lays out left to right in the label, description and status box — verified (FieldLabel.tsx:302-307, :386-390, Field.tsx:324-328, FieldStatus.tsx:225-227; the browser-spec jobs pass).
  • Claim: text with a right-to-left letter keeps the page direction — verified (utils/textDirection.ts:29; Field.test.tsx:868-875).
  • Claim: on a left-to-right page nothing visible changes, and there is no API change — verified (only rendered children change; an ltr span on an ltr page lays out the same).
  • Claim: the same helper already covers InputGroupText, Badge and Token — verified (InputGroupText.tsx:103, Badge.tsx:274, Token.tsx:356).
  • Claim: the span sits inside the existing element, so alignment, marker and status glyph follow the page — verified (FieldLabel.tsx:307-313, FieldStatus.tsx:246-263).
  • Claim: the span depends only on the text, on every page, including a bare right-to-left region — verified (Field.test.tsx:813-825, :844-859).
  • Claim: an empty label or status message gets no span — verified (FieldLabel.tsx:302, FieldStatus.tsx:227; Field.test.tsx:861-866).
  • Claim: about 30 existing tests now take the element around the span, a test-only change — count verified (31 query sites in 11 core test files); consumer suites meet the same change (finding above).
  • Claim: the accessible name and description do not change — verified (Field.test.tsx:830-831, :856-858).
  • Claim: the first new unit case fails on main — verified by reading the base, which renders the label text with no span.
  • Claim: a new Field story feeds the shared mixed-direction browser spec — verified (story and spec rows added; the browser-spec jobs pass).
  • Claim: every component folder that renders Field passes its suites — false (RichTextEditor.test.tsx:410 fails).
  • Claim: typecheck and lint pass — verified (CI typecheck and lint pass).
  • Claim: right-to-left output at this head matches the earlier stills, and left-to-right stills are identical — consistent with the code (the earlier commit wrapped the same non-empty texts under right-to-left).
  • Claim: the record change is FR10, its verification row and one verified-by path — verified.
  • Changeset: the label, description and status message keep their written order — partly false (the tooltip placement's message).
  • Changeset: such text used to reorder and now sits in an inner span; text with a right-to-left letter keeps the page direction; alignment, marker, icon, name and description do not change — verified (as above).
  • Changeset: left-to-right pages are unchanged — false (the markup changes on every page).
  • .changeset/field-mixed-direction-text.md — finding (left-to-right and status-message claims).
  • apps/storybook/stories/Field.stories.tsx — clear.
  • docs/specs/components/Field/Field.spec.md — finding (FR10 names a tooltip message the code does not wrap; compatibility lines say no DOM change).
  • packages/core/src/Field/Field.tsx — finding (copied wrap).
  • packages/core/src/Field/FieldLabel.tsx — finding (copied wrap; the span on every page breaks the RichTextEditor test).
  • packages/core/src/FieldStatus/FieldStatus.tsx — finding (copied wrap).
  • packages/core/src/Field/Field.test.tsx — clear.
  • packages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts — clear.
  • CheckboxInput, CheckboxList, CheckboxList.required, FormLayout, InputGroup, RadioList, Switch, TextArea, TextInput and TokenizerBottomSheet test files — clear (text queries updated for the span).

Automated review (maintainer link)

Comment thread packages/core/src/Field/FieldLabel.tsx Resolved
Comment thread packages/core/src/Field/Field.tsx Resolved
… tooltip keeps written order

withTextDirection in utils/textDirection.ts puts plain left-to-right text in
an inner dir="ltr" span and leaves an empty string alone. FieldLabel, Field's
horizontal description, FieldStatus, InputGroupText and the status tooltip of
statusVariant="tooltip" call it, so the rule lives in one place. The Field
record and the changeset now say the span changes the markup on every page
while nothing visible changes. RichTextEditor's label test takes the element
around the span.
@cixzhang
cixzhang marked this pull request as draft November 12, 2026 03:04
@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 03:05

@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: CI has not run on this head yet, because the pull request is still a draft, and the required checks need to pass once it is ready for review. The right-to-left fix holds at this head, its tests pass, and an engineering owner approved the record changes for this exact head. The two description statements flagged in the last review, the suite counts and the list of what the newest merge of main changes, now match this head.

Non-blocking:

  • The FR10 verification row in Field.spec.md could also name the Selector and MultiSelector tooltip cases and the two wrapped-label browser cases, so a change that drops one shows up against FR10.
  • MultiSelector AR1's gap sentence and its popover-gap verification row state work order ("waits for", "fails until"); the observable gap alone is enough.
Claims and files checked

Review mode: same-head; reason: none

  • Rules changed since the last review: changed rules (0).
  • Claim, verified: on a right-to-left page plain Latin label, description and status text used to reorder, and now reads as written in every Field-based input, InputGroup included.
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages look the same, and no public API changes.
  • Claim, verified: the existing text-direction helper already served InputGroupText, Badge and Token; the new wrapper is used by the label, both description layouts, the status box, InputGroupText and the three status tooltips.
  • Claim, verified: the span depends only on the text, never on a direction read, and empty text gets none.
  • Claim, verified: the span takes its parent's alignment with both the standard and the prefixed keyword; the WebKit behaviour is stated as not run.
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the trigger, and the popover is unchanged and recorded as a gap.
  • Claim, verified: 22 existing tests now read the element around the span (21 in core, one in the rich-text editor), and accessible names and descriptions are unchanged.
  • Claim, verified: the unit, tooltip, listbox-name, wrapped-label, searchable-sheet and real-layout tests exist as described and fail before the fix where the description says so.
  • Claim, verified: at this head the named suites run 1,107 tests in 48 files and 284 tests in 5 files, all passing, and core type checking and the knowledge check pass; the CheckboxInput test file is unchanged from main.
  • Claim, verified: the newest merge of main changes six of this pull request's files and brings the five listed changes, the earlier merges change only the files named, and Field, FieldLabel and FieldStatus are unchanged since the previous head; no captured still shows a selector or an open list.
  • Claim, stated for earlier runs and not rerun: the wider 174-file run, the 194-test run, the earlier lint run and the Chrome stills with their byte-identity statements.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
  • Changeset, verified: every sentence, including the span on left-to-right pages and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization record, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, non-blocking note: the Field record (its FR10 verification row) and the MultiSelector record (its AR1 gap wording).

Automated review (maintainer link)

# Conflicts:
#	docs/specs/components/MultiSelector/MultiSelector.spec.md
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 53be7ac

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 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 right-to-left fix itself holds at this head and an engineering owner approved the record changes for this exact head, but the newest merge of main leaves one failing test and two out-of-date description statements.

  • Regression: FieldLabel.test.tsx:45, in the "draws the label in the primary text colour and its description in the secondary" test that the merge brings in, now gets the inner dir="ltr" span from getByText('We never share it') and fails (expected var(--color-text-secondary), received null), so read .parentElement there as the other 22 edited tests do.
  • Regression: the description's Verification bullet still calls an earlier head "this head, after the latest merge of main" with 1,107 tests in 48 files and 284 in 5 all passing, and its stills bullet leaves out the newest merge, which changes FieldLabel.tsx, MultiSelector.tsx, Selector.tsx, MultiSelector.spec.md, internationalization.md and six of this pull request's test files, so please restate both bullets for the current head.

The two non-blocking notes on the FR10 verification row and on MultiSelector AR1's gap wording still apply. CI has not run on this draft head yet.

Claims and files checked

Review mode: same-head; reason: none

  • Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input.
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages render pixel-identical, and no public API changes.
  • Claim, verified: the existing text-direction helper already served the input-group text, badge and token; the new wrapper is used by the label, both description layouts, the status box, the input-group text and the three status tooltips.
  • Claim, verified: the span depends only on the text, never on a direction read, and empty text gets none.
  • Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, so wrapped and centred labels keep their line positions; the WebKit behaviour is stated as not run.
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the trigger, and the popover is unchanged and recorded as a gap.
  • Claim, verified: 22 existing tests now read the element around the span (21 in core, one in the rich-text editor), and accessible names and descriptions are unchanged.
  • Claim, verified: the unit, tooltip and searchable-sheet tests fail before the fix and pass after it.
  • Claim, verified: the listbox-name tests and the wrapped-label browser checks exist as described.
  • Claim, stated for earlier heads and not rerun: the wider 174-file run, the 194-test run, the type, lint and knowledge checks, and the Chrome stills with their byte-identity statements.
  • Claim, false: the named suites "at this head, after the latest merge of main" run 1,107 tests in 48 files and 284 in 5, all passing; at this head they run 1,140 in 54 with one failure, and 290 in 7.
  • Claim, false: the list of what later merges of main change, and the statement that the label component is unchanged since an earlier head, leave out the newest merge.
  • Claim, verified: the checkbox-input test is unchanged from main.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
  • Changeset, verified: every sentence, including the span on left-to-right pages and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization record, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the browser spec, and the Field, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, finding: the FieldLabel test file (the merged colour test fails with the span); the Field record (FR10 verification row, non-blocking); the MultiSelector record (AR1 gap wording, non-blocking).

Automated review (maintainer link)

Comment thread packages/core/src/Field/FieldLabel.tsx Resolved
… the direction span; name the status-tooltip and wrapped-label cases under FR10
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d9958d0

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 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 right-to-left fix holds at this head and an engineering owner approved the record changes for it, but two sentences in the description are still false.

  • The description says 22 existing tests (21 in core) now read the element around the new span, but this head also edits the label-colour test in FieldLabel.test.tsx, so the count is 23 (22 in core).
  • The stills bullet says stills of this head follow, but the only table after it is an earlier head's set (wrapped label, centred label and tooltip), so please add stills of this head or drop that clause.

The code, the records and the changed unit tests check out at this head, and CI has not run on this draft head yet.

Claims and files checked

Review mode: same-head; reason: none

  • Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input (Field Mixed Direction story frames; Field.test.tsx right-to-left cases).
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (Field.test.tsx page-direction case; byte-identical left-to-right frames; no export changes).
  • Claim, verified: the existing text-direction helper already served the input-group text, badge and token (Badge.tsx:30, Token.tsx:50).
  • Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element (FieldLabel.tsx:309-312, Field.tsx:322, FieldStatus.tsx:224).
  • Claim, verified: the span depends only on the text, and empty text gets none (textDirection.ts:53-58; the empty-status case in Field.test.tsx).
  • Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (InputGroupText.tsx:114, useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2858; the INV11 sentence).
  • Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (textDirection.ts:42).
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (MultiSelector.tsx:2480-2483; the listbox-name and required cases in MultiSelector.test.tsx; the AR1 gap line).
  • Claim, false: 22 existing tests (21 in core) now read the element around the span; at this head there are 23 (22 in core).
  • Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
  • Claim, verified: the unit, tooltip, listbox-name, searchable-sheet and wrapped-label tests exist as described, and the red-first ones fail before the fix.
  • Claim, verified: at this head the label and multi-selector test files pass 268 of 268, and the knowledge check passes.
  • Claim, stated for earlier heads and not rerun: the wider suite counts, the type and lint checks, and the Chrome stills with their byte-identity statements.
  • Claim, verified: the checkbox-input test is unchanged from main.
  • Claim, verified: the list of this pull request's files that the latest merge of main changes.
  • Claim, false: stills of this head follow the stills bullet; only an earlier head's stills do.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
  • Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, finding: none; both findings are in the pull request description.

Automated review (maintainer link)

@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: CI has not run on this draft head yet. A Field's plain Latin label, description, status message and status tooltip now keep their written order on right-to-left pages, an engineering owner approved the record changes for this head, and the two description sentences flagged last time now match the code.

CI runs once the pull request leaves draft, and the merge guard needs it green before merge.

Claims and files checked

Review mode: same-head; reason: none

  • Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px; Field.test.tsx right-to-left cases).
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows match on both sides; the left-to-right frame is byte-identical; no export changes).
  • Claim, verified: the existing text-direction helper already served the input-group text, badge and token (Badge.tsx:282, Token.tsx:364, InputGroupText.tsx:114).
  • Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (FieldLabel.tsx:309-312, Field.tsx:322, FieldStatus.tsx:224; frames).
  • Claim, verified: the span depends only on the text and empty text gets none (textDirection.ts:53-58; the empty-status case in Field.test.tsx).
  • Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2858; the INV11 sentence).
  • Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (textDirection.ts:42; the wrapping label in the 390 px frame).
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line).
  • Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (enumerated per file).
  • Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
  • Claim, verified: the unit, tooltip, listbox-name, searchable-sheet and wrapped-label tests exist as described, and the red-first ones fail before the fix.
  • Claim, verified: at this head the label and multi-selector test files pass 268 of 268, and the knowledge check passes.
  • Claim, stated for earlier heads and not rerun: the wider suite counts, the type and lint checks, and the earlier Chrome stills with their byte-identity statements.
  • Claim, verified in substance: the separately linked stills of this head show the label, description and status reading as written under right-to-left where the base reorders them, with left-to-right unchanged (this review's own frames; the linked stills were not opened).
  • Claim, verified: the checkbox-input test is unchanged from the base.
  • Claim, verified: the list of this pull request's files that the latest merge of main changes.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
  • Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, finding: none.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f113200

@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. A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, an engineering owner approved the record changes for this exact head, and CI passed on it, including the real-layout browser checks for the label, description, status and wrapped label.

Nothing else is needed from the author.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px; the right-to-left cases in Field.test.tsx).
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows get no span; the left-to-right frame is pixel-identical; no export changes).
  • Claim, verified: the existing text-direction helper already served the input-group text, badge and token (Badge.tsx:282, Token.tsx:364, InputGroupText.tsx:114).
  • Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (FieldLabel.tsx:309-312, Field.tsx:322, FieldStatus.tsx:224; frames).
  • Claim, verified: the span depends only on the text, works in a right-to-left region without the provider, and empty text gets none (textDirection.ts:53-58; the unit cases render a plain right-to-left region; the empty-status case).
  • Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2858; the INV11 sentence).
  • Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (textDirection.ts:42; the span resolves to right under right-to-left and left under left-to-right).
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line).
  • Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (counted per file).
  • Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
  • Claim, verified: the unit, tooltip, listbox-name, searchable-sheet, wrapped-label and real-layout tests exist as described and pass on this head (the real-layout and wrapped-label cases in CI's browser run); their red-first failures on the base were shown on the same code and were not rerun.
  • Claim, verified in substance: the label and multi-selector test files pass 268 of 268 and the knowledge check passes; the sentence names the previous commit as this head, and the count also holds here, where the only later change is a type assertion in one test.
  • Claim, not checkable against the code: the author's full pre-merge check before leaving draft; CI passed on this head.
  • Claim, stated for earlier heads and not rerun: the wider suite counts and the earlier Chrome stills with their byte-identity statements; the frames taken at this head match what they describe.
  • Claim, verified: the list of this pull request's files that each merge of main changes, and that the Field, label and status sources were unchanged by the earlier merge.
  • Claim, verified: the checkbox-input test is unchanged from the base.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section, the scope and the land path.
  • Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, finding: none.

Automated review (maintainer link)

@rubyycheung rubyycheung 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.

Design approved. I compared the supplied before-and-after phone screenshots: https:// and +3 keep their written order on a right-to-left page, while the field layout and mixed-direction text stay in place. This fixes readability without changing the layout.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec db79aa8

@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: CI has not run on this head yet, because the pull request is still a draft; it runs once the pull request is marked ready for review.

A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages. The newest commit only merges main, an engineering owner approved the record changes for this exact head, and the unit tests of every Field-based input pass on it.

Nothing else is needed from the author.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px; the right-to-left cases in Field.test.tsx).
  • Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows get no span; the left-to-right frame is pixel-identical; no export changes).
  • Claim, verified: the existing text-direction helper already served the input-group text, badge and token (Badge.tsx:282, Token.tsx:364, InputGroupText.tsx:114).
  • Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (FieldLabel.tsx:309-312, Field.tsx:322, FieldStatus.tsx:224; frames).
  • Claim, verified: the span depends only on the text, works in a right-to-left region without the provider, and empty text gets none (textDirection.ts:53-58; the unit cases render a plain right-to-left region; the empty-status case).
  • Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2858; the INV11 sentence).
  • Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (textDirection.ts:42; on this head the wrapped label's lines meet the page's start edge in both directions and stay centred in a centred container).
  • Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line).
  • Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (counted per file).
  • Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
  • Claim, verified: the unit, tooltip, listbox-name and searchable-sheet tests exist as described and pass on this head; the wrapped-label and real-layout browser cases passed in CI on the previous head with the same patch, and a layout probe on this head reproduces the wrapped-label checks; their red-first failures on the base were not rerun.
  • Claim, verified in substance: the label and multi-selector test files pass 268 of 268 and the knowledge check passes; the sentence names an earlier commit, and both hold on this head when rerun.
  • Claim, not checkable against the code: the author's full pre-merge check before leaving draft; CI has not run on this draft head.
  • Claim, stated for earlier heads and not rerun: the wider suite counts and the earlier Chrome stills with their byte-identity statements; on this head every Field-based input's unit tests pass and the frames match what the stills describe.
  • Claim, verified: the list of this pull request's files that each merge of main changes; the newest merge changes none of them.
  • Claim, verified: the checkbox-input test is unchanged from the base.
  • Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section, the scope and the land path.
  • Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
  • Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
  • Files, finding: none.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 3450d89

@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 for two sentences of the description; the right-to-left fix itself checks out. A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, left-to-right pages are pixel-identical, and an engineering owner approved the Field, MultiSelector and internationalization record text for this head.

  • Regression: the Suites bullet says FieldLabel.test.tsx and MultiSelector.test.tsx pass 268 of 268 "at this head", but the newest merge of main adds three MultiSelector list-format tests (#13132), so they now run 271; scope the 268 to the earlier head, or give 271 of 271.
  • Regression: the stills bullet accounts for what each merge of main changes among this pull request's files but leaves out the newest one, which changes MultiSelector.tsx and MultiSelector.test.tsx (#13132) and internationalization.md (#13131); add a sentence for it, noting that no captured state shows a MultiSelector trigger.

Non-blocking miss: the Scope section could also name the component:MultiSelector record, whose AR1 this pull request adds. CI has not run on this draft head yet.

Claims and files checked

Review mode: same-head; reason: none

  • Today plain Latin label, description and status text reorders under right-to-left in every Field-based input, InputGroup included: verified (base frames of the Mixed Direction story; the new Field.test.tsx right-to-left case fails on the base).
  • After the change, text with no right-to-left letter reads as written: verified (head frames; Field.test.tsx and FieldLabel.test.tsx right-to-left cases).
  • Text with a right-to-left letter keeps the page's direction: verified (Field.test.tsx "keeps the page direction for text with a right-to-left letter"; the Arabic rows are unchanged in the frames).
  • Left-to-right pages show no visible change, and no API changes: verified (byte-identical left-to-right frame; the API generator lists no added, changed or removed row).
  • InputGroupText, Badge and Token already follow the same rule through the internal helper: verified (InputGroupText.tsx:114, Badge.tsx:282, Token.tsx:364).
  • The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (FieldLabel.tsx:309-312, FieldStatus.tsx:224 and :259; wrapped-label probe).
  • No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (textDirection.ts:53-58; the tests use a plain dir="rtl" region; "adds no span to an empty status message").
  • One helper serves the label, both descriptions, the status box, InputGroupText and the three status tooltips, and INV11 names it: verified (Field.tsx:322, useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2867; internationalization.md:332-335).
  • Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified (lines meet the label's start edge under both directions and stay centred in a centred container; Chromium reports match-parent unsupported and -webkit-match-parent supported); WebKit not run, as the description says.
  • MultiSelector's searchable sheet names its listbox by the label alone, the popover is unchanged, and the required state stays on the control: verified (MultiSelector.tsx:2489-2492; the AR1 cases in MultiSelector.test.tsx).
  • 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
  • Accessible names and descriptions are unchanged: verified (Field.test.tsx and TextInput.test.tsx name and description assertions).
  • The new unit, tooltip and searchable-sheet cases fail before the fix: verified (each fails on the base with this head's tests).
  • The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (MixedDirectionText.a11y.chromium.spec.ts, the Field surfaces and the two wrapped-label tests).
  • Core typecheck, ESLint and the knowledge check pass: verified at this head.
  • At this head the FieldLabel and MultiSelector tests pass 268 of 268: false (271 of 271 at this head).
  • The stills bullet's account of what the merges of main change among this pull request's files: false (it leaves out the newest merge's MultiSelector and internationalization changes).
  • Measurements and stills stated for named earlier heads: historical, not re-measured; the frames taken at this head match their conclusions.
  • Records changed and the writing rubric: verified against the three record diffs.
  • A visually hidden label and its description keep their text with no span, as FR10 and the changeset state: verified (FieldLabel.tsx:309-312, Field.tsx:313-316; the hidden-label case in FieldLabel.test.tsx).
  • Scope section: verified except that it leaves out the MultiSelector record (non-blocking).
  • Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
  • .changeset/field-mixed-direction-text.md: clear
  • apps/storybook/stories/Field.stories.tsx: clear
  • docs/architecture/internationalization.md: clear
  • docs/specs/components/Field/Field.spec.md: clear
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear
  • packages/core/src/utils/textDirection.ts and textDirection.test.ts: clear
  • packages/core/src/Field/Field.tsx, FieldLabel.tsx, Field.test.tsx, FieldLabel.test.tsx: clear
  • packages/core/src/FieldStatus/FieldStatus.tsx: clear
  • packages/core/src/InputGroup/InputGroupText.tsx and InputGroup.test.tsx: clear
  • packages/core/src/hooks/useInputStatusIcon.tsx: clear
  • packages/core/src/Selector/Selector.tsx and Selector.test.tsx: clear
  • packages/core/src/MultiSelector/MultiSelector.tsx and MultiSelector.test.tsx: clear, including what the merge of main brings in
  • packages/core/src/TextInput/TextInput.test.tsx, TextArea/TextArea.test.tsx, Switch/Switch.test.tsx, RadioList/RadioList.test.tsx, FormLayout/FormLayout.test.tsx: clear
  • packages/core/src/CheckboxList/CheckboxList.test.tsx and CheckboxList.required.test.tsx: clear
  • packages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clear
  • packages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clear
  • packages/richtext/src/RichTextEditor.test.tsx: clear

Automated review (maintainer link)

@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: CI has not run on this head yet, because the pull request is still a draft; it runs once the pull request is marked ready for review.

A Field's plain Latin label, description, status message and status tooltip now keep their written order on right-to-left pages, left-to-right pages stay pixel-identical, and an engineering owner approved the Field, MultiSelector and internationalization record text for this exact head. The two description sentences flagged last time now match the head: the Suites bullet gives this head's run, which reproduces, and the stills bullet covers the newest merge of main.

Claims and files checked

Review mode: same-head; reason: none

  • Today plain Latin label, description and status text reorders on right-to-left pages in every Field-based input, InputGroup included: verified (base frames of the Mixed Direction story; the new right-to-left Field test fails on the base).
  • After the change, text with no right-to-left letter reads as written: verified (head frames; the Field and FieldLabel right-to-left tests).
  • Text with a right-to-left letter keeps the page's direction: verified (the Field test for it; the Arabic rows are unchanged in the frames).
  • Left-to-right pages show no visible change, and no API changes: verified (the left-to-right frame is pixel-identical; no export, prop, type, theme target or data attribute changes).
  • InputGroupText, Badge and Token already follow the same rule through the internal helper: verified (InputGroupText.tsx:114, Badge.tsx:282, Token.tsx:364).
  • The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (FieldLabel.tsx:309-312, FieldStatus.tsx:224 and :259; the 390 px frames).
  • No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (textDirection.ts:53-58; the tests use a plain right-to-left region; the empty-status test).
  • One helper serves the label, both descriptions, the status box, InputGroupText and the three status tooltips, and INV11 names it: verified (Field.tsx:322, useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2867; the INV11 sentence in internationalization.md).
  • Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified in Chromium (both wrapped-label browser tests pass); WebKit not run, as the description says.
  • MultiSelector's searchable sheet names its listbox by the label alone, the popover is unchanged, and the required state stays on the control: verified (MultiSelector.tsx:2489-2491; the listbox-name tests, which fail on the base with search on).
  • 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
  • Accessible names and descriptions are unchanged: verified (the name and description assertions in the Field and TextInput tests).
  • The new unit, tooltip and searchable-sheet tests fail before the fix: verified (eight new behavior tests fail on the base with this head's tests).
  • The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (it passes 16 of 16 in Chromium).
  • Core typecheck, ESLint and the knowledge check pass: verified (core typecheck, ESLint on the changed files and the knowledge check pass here; ESLint reports only warnings).
  • At this head the ten named suites pass 3,406 of 3,406: verified (reproduced; the Field and Token suites include FieldStatus and Tokenizer by name).
  • At this head the Chromium accessibility and interaction specs pass: verified for the specs that cover the changed components (38 of 38 accessibility and 27 of 27 Chromium interaction tests); the description does not list which files make up its 29 and 12, so those totals were not matched.
  • The earlier full Field-family run (5,332 tests in 174 files), the Field and FieldStatus count after the empty-text fix, and the counts and stills stated for named earlier heads: historical runs, not re-measured; every suite run here passes, and the frames taken at this head match the stills' conclusions.
  • The newest merge of main changes MultiSelector.tsx, MultiSelector.test.tsx and internationalization.md among this pull request's files: verified (exactly those three, from the locale list-format and PowerSearch locale changes; no conflict resolution).
  • No captured state shows a MultiSelector trigger, and the trigger is unchanged: verified from the code (this pull request's MultiSelector change touches only the listbox name and the status tooltip); the linked outside take was not read.
  • Records changed and the writing rubric: verified against the three record diffs.
  • A visually hidden label and its description keep their text with no span: verified (FieldLabel.tsx:309-312, Field.tsx:313-316; the hidden-label test).
  • Scope section, now including the MultiSelector record: verified.
  • Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
  • .changeset/field-mixed-direction-text.md: clear
  • apps/storybook/stories/Field.stories.tsx: clear
  • docs/architecture/internationalization.md: clear
  • docs/specs/components/Field/Field.spec.md: clear
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear
  • packages/core/src/utils/textDirection.ts and textDirection.test.ts: clear
  • packages/core/src/Field/Field.tsx, FieldLabel.tsx, Field.test.tsx, FieldLabel.test.tsx: clear
  • packages/core/src/FieldStatus/FieldStatus.tsx: clear
  • packages/core/src/InputGroup/InputGroupText.tsx and InputGroup.test.tsx: clear
  • packages/core/src/hooks/useInputStatusIcon.tsx: clear
  • packages/core/src/Selector/Selector.tsx and Selector.test.tsx: clear
  • packages/core/src/MultiSelector/MultiSelector.tsx and MultiSelector.test.tsx: clear, including what the merge of main brings in
  • packages/core/src/TextInput/TextInput.test.tsx, TextArea/TextArea.test.tsx, Switch/Switch.test.tsx, RadioList/RadioList.test.tsx, FormLayout/FormLayout.test.tsx: clear
  • packages/core/src/CheckboxList/CheckboxList.test.tsx and CheckboxList.required.test.tsx: clear
  • packages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clear
  • packages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clear
  • packages/richtext/src/RichTextEditor.test.tsx: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 156ff1b

@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: CI is running on this head now that the pull request is ready for review; every check has passed so far except one unit-test shard that is still running, and the merge guard waits for it.

A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, and left-to-right pages stay pixel-identical. An engineering owner approved the Field, MultiSelector and internationalization record text for this exact head, and the right-to-left tests and the Chromium mixed-direction spec pass on it.

Nothing else is needed from the author.

Claims and files checked

Review mode: same-head; reason: none

  • Today plain Latin label, description and status text reorders on right-to-left pages in every Field-based input, input groups included: verified (base frames of the Mixed Direction story; the new right-to-left Field test fails on the base).
  • After the change, text with no right-to-left letter reads as written: verified (the Field and FieldLabel right-to-left tests and CI's Chromium mixed-direction spec pass on this head; head frames).
  • Text with a right-to-left letter keeps the page's direction: verified (the Field test for it; the Arabic rows are unchanged in the frames).
  • Left-to-right pages show no visible change, and no API changes: verified (the left-to-right frame is pixel-identical; no export, prop, type, theme target or data attribute changes).
  • The input-group text, badge and token already follow the same rule through the internal helper: verified (InputGroupText.tsx:114, Badge.tsx:282, Token.tsx:364).
  • The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (FieldLabel.tsx:309-312, FieldStatus.tsx:224; the 390 px frames).
  • No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (textDirection.ts:53-58; the tests use a plain right-to-left region; the empty-status test).
  • One helper serves the label, both descriptions, the status box, the input-group text and the three status tooltips, and the internationalization record names it: verified (Field.tsx:322, useInputStatusIcon.tsx:230, Selector.tsx:2516, MultiSelector.tsx:2867; the helper sentence beside INV11).
  • Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified in Chromium (both wrapped-label cases pass in CI on this head); WebKit not run, as the description says.
  • The searchable bottom sheet names its listbox by the label alone, the popover is unchanged and recorded as a gap, and the required state stays on the control: verified (MultiSelector.tsx:2487-2492; the listbox-name and required tests pass on this head).
  • 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
  • Accessible names and descriptions are unchanged: verified (the name and description assertions in the Field and TextInput tests).
  • The new unit, tooltip and searchable-sheet tests fail before the fix: verified with the same patch (eight new behavior tests fail on the base).
  • The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (16 of 16 in CI's Chromium run on this head).
  • Core typecheck, ESLint and the knowledge check pass: verified (CI's typecheck and lint jobs pass on this head; the knowledge check passed on this head).
  • The ten named suites pass 3,406 of 3,406, stated for an earlier commit: verified in substance; on this head those suites and the other changed test files pass 3,963 of 3,963.
  • The Chromium accessibility and interaction specs pass: verified in substance (CI's finished accessibility browser-spec jobs on this head pass, and on the identical patch the specs for the changed components passed 38 of 38 and 27 of 27); the description does not list which files make up its 29 and 12.
  • The full pre-merge check runs before the pull request leaves draft: a local step that cannot be checked from the repository; CI's own checks now run on this head.
  • The earlier full Field-family run, the count after the empty-text fix, and the counts and stills stated for named earlier commits: historical runs, not re-measured; every suite run here passes.
  • The list of this pull request's files that each merge of main changes: verified; the newest merge changes none of them.
  • No captured state shows a multi-selector trigger, and the trigger is unchanged: verified from the code (the multi-selector change touches only the listbox name and the status tooltip).
  • The checkbox-input test is unchanged from the base: verified.
  • The records-changed list, the writing-rubric results, the hidden-label section and the scope: verified against the three record diffs and the head.
  • The land path (draft until the automated review approves this head, then ready for review, CI and merge): consistent; the pull request left draft after that approval and CI is running.
  • A visually hidden label and its description keep their text with no span: verified (FieldLabel.tsx:309-312; the hidden-label test).
  • Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
  • .changeset/field-mixed-direction-text.md: clear
  • apps/storybook/stories/Field.stories.tsx: clear
  • docs/architecture/internationalization.md: clear
  • docs/specs/components/Field/Field.spec.md: clear
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear
  • packages/core/src/utils/textDirection.ts and textDirection.test.ts: clear
  • packages/core/src/Field/Field.tsx, FieldLabel.tsx, Field.test.tsx, FieldLabel.test.tsx: clear
  • packages/core/src/FieldStatus/FieldStatus.tsx: clear
  • packages/core/src/InputGroup/InputGroupText.tsx and InputGroup.test.tsx: clear
  • packages/core/src/hooks/useInputStatusIcon.tsx: clear
  • packages/core/src/Selector/Selector.tsx and Selector.test.tsx: clear
  • packages/core/src/MultiSelector/MultiSelector.tsx and MultiSelector.test.tsx: clear
  • packages/core/src/TextInput/TextInput.test.tsx, TextArea/TextArea.test.tsx, Switch/Switch.test.tsx, RadioList/RadioList.test.tsx, FormLayout/FormLayout.test.tsx: clear
  • packages/core/src/CheckboxList/CheckboxList.test.tsx and CheckboxList.required.test.tsx: clear
  • packages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clear
  • packages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clear
  • packages/richtext/src/RichTextEditor.test.tsx: clear

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 156ff1b0 Deployed Nov 21, 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 A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) 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. lane:1 Astryx fix-loop lane 1 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants