Repository navigation
feat(mobile): outline every text field at 3:1 with a focus ring, and drop the composer shadow - #37221
Conversation
Fields with no controls of their own were told apart from their surface only by a fill and a hairline at 1.17-1.57:1, so search fields and sheet fields read as flat blocks. They now share an inputBorder edge (#737373, 3.19-4.74:1 on screen, sheet and sheet group in both themes) and a 2pt accent ring on focus. Composer-style boxes keep their look, lose the docked shadow, and draw their edge at 1px like desktop's composer.
A focus flag held by a parent outlived the input when a step or tab swap unmounted it while focused, so the field came back with a stale ring. Raw holdouts now use FieldTextInput and the terminal live field uses TextField, so focus state mounts and unmounts with the input.
…on composer boxes
|
No actionable comments were generated in the recent review.
|
…nsus FieldTextInput forwards its style to the TextInput inside, so the census saw an unresolved style there and lost sight of the call sites' sizes. It now reads FieldTextInput tags like TextInput and treats the wrapper's forwarded style as checked at those call sites.
ELI5
On the phone, search boxes and form fields didn't look like places you can type, especially in light mode. A white box on a white sheet, or a dark grey box on a slightly different dark grey, just reads as a block. Every plain field now has a clear grey outline in both themes, and a blue ring while you're typing in it. The chat composer and the other composer boxes keep their look, but lose their drop shadow.
What Changed
inputBorder(#737373) inmobile-theme.ts, both palettes. This is desktop's dark--ring. It reaches 3:1 against every surface a field sits on: screen, sheet and sheet group, light and dark.composer-input:inputBorderedge.accentBluering on focus. It is drawn as border plus a 1px outline, so nothing moves.useInputFocuskeeps the focus state and still calls the caller's ownonFocus/onBlur.TextField. This covers every search field (MobileSearchField,BottomSearchBar, Jump to file, pickers) and every single-line sheet field (new workspace, reviewers, link PR, settings and host edit, quick commands, tasks).MessageBox: review notes and description boxes.FieldTextInput, for fields that set their own size: Create PR title and description, the PR edit sheet, automation fields, the browser's "Type on page" and the custom-key capture box.TextField.TextInputs with their own one-off fills.dockedstyle and prop are deleted; only the chat composer and the terminal dock read it.composerBorderedge is now 1px instead of a hairline, which matches desktop's composer.mobile-web-app-text-input-font-size-seam.mjs) now reads<FieldTextInput>call sites like<TextInput>. It treats the wrapper's forwardedstyleas checked at those call sites, so every field's font size is still held to the iOS no-zoom seam. There is a fixture case for it.inputBorderandaccentBlueat 3:1 and the placeholder at 4.5:1 on every field surface, in both schemes.Why
Measured on main, a field's fill and hairline edge were 1.17 to 1.57:1 against the surface they sit on. WCAG 1.4.11 asks for 3:1 for whatever visually identifies a control. The research (in Notes) says the boundary has to carry it: a fill near the sheet tones can't reach 3:1 without turning into a dark block in light mode. The iOS system fills and Material's filled container also fail 3:1 on their own. Material's outlined field and Primer's emphasis border both use a solid 3:1 outline.
The fix sits in the token and the shared field components, not in each screen. Raw-
TextInputholdouts moved onto the family, so the next field picks the rule up for free.Composer-style boxes stay as they are. W3C only requires a boundary "when there is no other visual way to identify the presence of the control". These boxes have Send/attach controls and a 4.7:1 placeholder.
The focus state lives in the component that owns the input. A first version kept it in the parent, and review caught the ring going stale when a focused field unmounted.
Linked Issue
No issue. This is a design build Kelvin asked for: mobile inputs don't clearly read as inputs. It follows the input unification in #36166.
Visual Proof
Each image shows before dark, after dark, before light and after light. All captures are OTA page renders in WebKit at 393×852 @3x.
Search on a screen (bottom search bar), rest and focused


Search in a sheet (review → Jump to file), rest and focused


Single-line field in a sheet (Create worktree → Start from), rest and focused


Form box in a sheet (review line note), rest and focused


Create PR sheet, title and description, rest and description focused


Terminal live input

Custom key sheet: text macro fields and shortcut key capture


Automations editor fields on a screen

Composer-style boxes, unchanged apart from the shadow and the 1px edge: chat composer, commit box, task comment composer



Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
I captured every input type above, before and after, in both themes, with a scripted host. That's 17 pairs, focused states included, from
pnpm run build:mobile-web, which still reports 181 assets, the same as main.mobile-theme-contrast.test.tsgained a case for field edge, focus ring and placeholder contrast on every field surface. It fails with the old edge colour and passes now.Focused vitest: theme, composer, terminal dock, custom key, PR sidebar, automations and tasks suites, 214 files.
Mobile typecheck (
mobile/tsconfig.json), pluscheck:code-quality:changedandcheck:react-doctor:changed. Lint and format ran on the changed files.No new strings, so localization is untouched. No host-calling code changed, so the RPC goldens don't apply.
Native shells weren't captured on a simulator. The same components render there, and RN 0.83's new architecture supports
outline*on iOS and Android.Risk
Level: Low
outlinestyle. On a native shell that ignored it, the focused field would show a 1pt blue border instead of 2pt. Nothing else changes.elevationon the chat and terminal composers. Those boxes now sit flat with their 1px edge.AI Disclosure
Review
Codex and a Claude subagent each ran one review round (
review-loop). Neither found a P0 or P1.FieldTextInput/TextField.The
simplifypass did two things:edge()helper;MessageBoxpasses focus handlers straight through when it has its own controls, so there are no wasted re-renders.FieldTextInput's sites ontoTextField/MessageBox. That would resize approved sheets. The PR description would shrink from 160–320 pt to 70–154 pt, and the browser input would grow from 34 to 44 pt. That's a separate design call.Agent skill upstream boundary
Notes
Research (primary sources)
tertiarySystemFillis "for input fields, search bars". It is translucent, and Apple publishes no RGBA values (https://developer.apple.com/documentation/uikit/uicolor/tertiarysystemfill).outlinerole is 4.33 / 5.87:1.outline-variantis "where 3:1 contrast ratio isn't required".borderColor-defaultis only 1.43 / 1.92:1.control.borderColor.emphasisis 3.45 / 3.57:1, and focus adds an accent border plus an outline.#737373in both themes: desktop's light--ring(#a1a1a1) is 2.37–2.58:1, and the next desktop neutral that clears 3:1 is #737373. Desktop's--inputis no better (#e5e5e5, 1.26:1 on white).Measured contrast, before → after (plain fields)
"Edge before" is the hairline
composerBordercomposited over the fill.Composer-style boxes (finding, not changed)
composerBorder, now 1px, same colour as desktop's composer border) is 1.57:1 (dark) and 1.27:1 (light) on the screen. It does not meet 3:1.composerBorderor giving composersinputBordertoo. That's a product call, left out of this PR.Try it (waiting for blessing)
/Users/kelvinamoaba/orca/workspaces/orca/sc-input-contrast(runpnpm run build:mobile-webto serve the pages).Shared pieces other branches pick up
inputBorder(mobile-theme.ts);composerInputStyles.focused/fieldInput;FieldTextInputanduseInputFocus(composer-input).MessageBoxno longer has adockedprop.Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)