This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(console): skip link as the shell's first Tab stop; record dialogs open on their first field (objectui#13130) - #13213
Merged
objectstack-fleet[bot] merged 1 commit intoOct 20, 2026
Conversation
… open on their first field The console shell had no skip link, so a keyboard user walked the app bar and every sidebar entry before reaching the page. ConsoleLayout now renders a "Skip to content" link first in the DOM (out of sight until focused); activating it focuses the route slot, which holds the page, without writing a hash into the URL. Copy is console.skipToContent in all ten packs. ModalForm's Create/Edit dialog opened on Close: its body loads after the dialog content mounts, and Close was the one tabbable element when Radix's focus scope picked. Its onOpenAutoFocus now keeps focus on the dialog while the body loads and moves it to the first editable field when the field lands, unless the user has moved focus meanwhile. Fixes objectui#13130 (declared in the PR body). Claude-Session: https://claude.ai/code/session_01GL347th7aWQUnY2k8diSLG Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对ACCEPT · Implemented-by:
Landing: ordinary queue landing (not governed): Generated by Claude Code |
objectstack-fleet
Bot
deleted the
claude/issue-13130-skip-link-dialog-focus
branch
October 20, 2026 10:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13130
Clause-②: no
Two keyboard defects from the console walkthrough (Showcase → Contacts). The shell had no skip link, so a list's New was about the 60th Tab stop. The record Create/Edit dialog opened with focus on Close instead of the first field.
What changed
Skip link (
@object-ui/app-shell,ConsoleLayout). A "Skip to content" link is rendered first in the console shell, beforeAppShell, so it is the first Tab stop in an ordinary session. It stays out of sight until focused (sr-only focus:not-sr-only, pinned top-left while focused). Activating it callspreventDefault()and focuses the route slot: theconsole-routediv that holds the page, which now carriesid="console-main-content"andtabIndex={-1}. No hash is written into the URL (objectui AGENTS §5 #8). Its text isconsole.skipToContent, in all ten packs.Dialog initial focus (
@object-ui/plugin-form:ModalFormplus the new moduleinitialFieldFocus.ts). Both ofModalForm's dialog arms (the flat form and the master-detailsubformsform) now passonOpenAutoFocusandonCloseAutoFocustoMobileDialogContent. On open, if the first editable field is already drawn, it gets focus. If not, the dialog element itself (Radix'stabIndex={-1}container, named by its title) takes focus, and aMutationObserverwatches the body. When the first editable field lands, focus moves to it, but only while focus is still on the dialog element; a control the user reached in the meantime keeps focus. "Editable field" means the first enabled, non-read-only control inside a[data-field]row, the same selector the form renderer'srevealFieldalready uses. Inactive tab panels are skipped.Measured mechanism: assumption 2 does not hold
skip to,skip-link,skipTo…acrosspackages/app-shell,packages/layoutandapps/consoleatc209c93finds zero hits. The control grep (aria-label, same tree) does hit.MobileDialogContentrenders its Close button after{children}. A probe of the loaded flat dialog read the tab orderinput, input, Cancel, Create, Close, with Close last and focus still on Close. Radix's focus scope picks the first tabbable element when the content mounts. At that momentModalForm's body is still its loading skeleton (the object schema read, the record read on edit, and theReact.lazyfield widgets), and the footer is not drawn yet. Close was the only tabbable element. The master-detail arm landed on one of its own buttons for the same reason.packages/componentschanges. The handler ridesMobileDialogContent's existing prop spread onto Radix'sContent.Where it lands, and why there
mainelement.mainis rendered by@object-ui/layout'sAppShell, which takes no id or ref for it, and adding one would be a new prop on a published component. The route slot isConsoleLayout's own element and holds the page of every app route.@object-ui/plugin-form, not in the hostAppContent. The claim allowed this placement for the case where the form owns the focus. The cause isModalForm's own loading.AppContentonly handsModalForma schema, and it cannot see when the body lands without a new schema key.initialFieldFocus.tsis not exported from the package entry.ObjectView.tsxis not touched (objectui#13139 is in flight there).Selectors for the browser reading
[data-testid="console-skip-to-content"](alsoa[href="#console-main-content"]). It should be the first Tab stop from page load.#console-main-content, the same element as[data-testid="console-route"]. After Enter on the skip link it isdocument.activeElement, and the next Tab reaches the page's first control.[role="dialog"], the control of the first[data-field]row. Once the body has loaded,document.activeElement.closest('[data-field]')is that row.Tests (head
7084cff)New pins:
packages/plugin-form/src/__tests__/modalInitialFieldFocus-13130.test.tsx(11 tests).findFirstEditableField.packages/app-shell/src/layout/__tests__/ConsoleLayout.skipToContent-13130.test.tsx(5 tests, real English pack).preventDefaulted.tabindex="-1".Reproduction. On unfixed
c209c93, the dialog pin read5 failed | 1 passed. Focus sat onMobileDialogContent's Close in the create, edit, loading and read-only cases, and on a chrome button in the master-detail arm.Ablations. Each is a single mutation through
ablation-replace.mjs, with restore proven by blob == HEAD and an emptygit diff HEAD. The subjects are imported fromsrc/, so nodist/is in the path. Every one went in its predicted direction.5 failed | 6 passed1 failed | 10 passed5 failed (5)preventDefault+focus()2 failed | 3 passedSuites on
7084cff(repo-root vitest,--maxWorkers=2, through the shared lock):packages/plugin-form/+packages/i18n/, including the locale parity tests:Test Files 280 passed (280),Tests 3679 passed | 14 skipped.app-shellandapps/consolefiles: everypackages/app-shell/src/layouttest, every test namingConsoleLayout,ModalFormorconsole-route, and the product-neutral ratchet. Result:Test Files 153 passed (153),Tests 1143 passed.Gates (local, head
7084cff, exit captured before any pipe)node scripts/check-changeset-presence.mjs: exit 0 (15 source files of 3 released packages, 1 changeset).pnpm check:new-line-citations: exit 0 (0 new citation(s)).pnpm check:control-bytes: exit 0.pnpm check:i18n-keys: exit 0.pnpm check:i18n-drift: exit 0 (1 key added, 0 en values changed).pnpm check:i18n-dead-keys: exit 0. The new key is not listed; two siblingconsole.*keys are, which is the control.pnpm --filtertype-checkfor@object-ui/plugin-form,@object-ui/i18nand@object-ui/app-shell: exit 0 each, after the closure buildturbo run build --filter='@object-ui/app-shell^...'(28/28).tsc -p tsconfig.test.json --listFilesOnlylists both new tests.content/docschange).Acceptance notes
Out-of-scope findings, not touched here. The report hands them to the seat.
DrawerFormhas the same initial-focus defect (measured). A probe on7084cffshows focus still onSheetContent's Close after the drawer's body loads. A named producer exists: showcasetask's form viewquick(type: 'drawer'). The fix would be the same hook onDrawerForm'sSheetContent, but that file is outside this claim's file surface.The record dialog's collapsible section header is not keyboard-operable (measured). The form renderer's
SectionDivider(packages/components/src/renderers/form/form.tsx) draws adivwithrole="button"andaria-expanded, and only anonClick: notabIndex, no key handler. ThroughModalFormwith a collapsed field group:Codeinput, Cancel, Create, Close) never stops on the header;So a keyboard user cannot reach a collapsed group's fields. A named producer exists: showcase
showcase_semantic_zoo'sMoneygroup (collapse: 'collapsed'). The record detail page's section header is already a real disclosure button; the dialog's row is not.Banners above the shell come before the skip link. When
ImpersonationBanner,ReadRateBannerorStorageUsageBannerrender, their controls precede it.ConsoleShelldraws them above every console layout. An ordinary session renders none of them. They are left in place because they are chrome for every console page, including/home, which has no route slot to skip to.Other shells have no skip link. This covers
@object-ui/layout'sAppShellunderAppSchemaRenderer, and the home layout. Neither is this card's route.The route slot is now focusable by script. A mouse click on a non-interactive part of the page focuses it (the outline is suppressed with
focus:outline-none). No Tab stop is added.Phones. The first field takes focus when the body loads, and Android may raise the on-screen keyboard. Radix does the same for any dialog whose first tabbable element at open is an input.
Tailwind ordering (measured).
focus:fixedwins over theposition: staticoffocus:not-sr-only. Compiling the classes with the installed tailwindcss 4.3.3 emits.focus\:fixed:focusafter.focus\:not-sr-only:focus.NOT MEASURED: the live Tab count from page load to New on Showcase → Contacts after this change, and how the focused skip link looks. The browser reading belongs to the seat; there is no backend here.
Generated by Claude Code