Skip to content

Admin UI: Proposal — redesign @wordpress/admin-ui as a focused admin-page framework (2.0) #77628

Open

Description

@ciampo

Summary

This proposal reframes @wordpress/admin-ui from a loose component library into a focused admin page framework: a small, opinionated surface that encodes WordPress's admin-page design spec as code, so consumers get correct semantics, accessibility, and visual rhythm for free — with no room to drift.

The redesign is a single major bump (@wordpress/admin-ui@2.0) that accepts breaking changes. After 2.0 the package exports exactly one component — <Page> — plus one narrow styling subcomponent, <Page.FullBleed>. Individual UI primitives move to @wordpress/ui; routing, chrome, and cross-tree communication move to consumers as plain props.

Page visualization

Key decisions at a glance

  • One public component. <Page> (with <Page.FullBleed> as a static property). No Breadcrumbs, no NavigableRegion, no Page.Section, no PageChromeProvider, no slot/fill, no exported type aliases.
  • Declarative data over JSX. Header content (badges, breadcrumbs, actions) is typed data. Cardinality rules that can be expressed in the type system (e.g. "≤ 2 secondary actions") are compile-time errors, not runtime warnings. PageActions is role-shaped: { primary?, secondary?, overflow? }.
  • Routing is the consumer's concern. No @wordpress/route import. Breadcrumb items carry href and/or onClick; component-based routers plug in via a single linkComponent prop. Works for static links, event-based routers, and component-based routers (@wordpress/route, React Router, Next.js) with no admin-ui changes.
  • Chrome injection is a plain prop. createSlotFill is dropped; the mobile sidebar toggle is forwarded through a leading?: ReactNode prop, with a one-line AppPage wrapper in @wordpress/boot replacing the current fill pattern.
  • Correct semantics by default. <main> landmark, <h1> always present (auto-hidden via <VisuallyHidden> when breadcrumbs are shown, per #76709), aria-current="page" on the last breadcrumb per WAI-ARIA APG, visual always treated as decorative (aria-hidden), actions wrapped in a labelled group with a spec-ordered primary / secondary / overflow layout.
  • CSS modules + design tokens. Authored as CSS modules, 100% logical properties, all values sourced from @wordpress/theme. Drops @wordpress/base-styles.
  • Responsive header is internal. Container-aware (ResizeObserver), not viewport-aware: actions overflow to an ellipsis menu, breadcrumbs collapse, the tagline truncates on scroll. No prop surface for it.
  • Explicit test contract. Unit + integration + jest-axe + type tests (tstyche) cover the 10 a11y invariants and every branch of the PageBreadcrumbItem discriminated union.

Related issues and PRs

  • #76709 — Admin UI: Page header design spec. Source of truth for visual/layout rules encoded by <Page> in 2.0 (heading visibility when breadcrumbs are present, actions ordering, responsive header behavior, hamburger position). Several open questions in this proposal point at this spec for sign-off.
  • #77039 — UI: Add Breadcrumb component (adapted from admin-ui). Prerequisite for admin-ui 2.0 step 4. The Breadcrumbs component moves here, becomes container-aware, and gains the data-first { href, onClick } shape + optional linkComponent.
  • #77040 — Admin UI: Decouple Page component from @wordpress/route. Closed by this proposal's §5.3 — routing integration becomes breadcrumb data plus an optional linkComponent.
  • #77032 — Admin UI: Move to CSS modules. Subsumed and extended by §8.1 (CSS modules + logical properties + @wordpress/theme tokens + drop @wordpress/base-styles).
  • #76929 — UI: Update components to use Text. Same Text usage pattern (variant + render) is what <Page> adopts for title, subtitle, and section heading guidance.
  • #72106 — NavigableRegion move history. Moved the component into admin-ui (not the other way around), which changes the migration strategy: a new home must be chosen before 2.0 can drop the export. See §2.1 and Q2 below.
  • #78881 - Opinionated canvas behaviour for common content types
  • #78902 - Supporting footers

Gating open questions

Two items must be resolved before the admin-ui 2.0 implementation lands:

  1. A11y sign-off on the spec (§6, §9, §6.1). The accessibility contract — single <main>, auto-hidden <h1> when breadcrumbs are present, decorative visual, the <main> vs. useNavigateRegions trade-off — needs review from the WordPress a11y team (e.g. @joedolson).
  2. NavigableRegion rehoming (§2.1, §13 Q2). Three options: rehome to @wordpress/interface, rehome to @wordpress/components (lives next to useNavigateRegions), or keep in admin-ui as a lock-unlock private export. The component itself is not modified.

The remaining open questions in §12 (dev-validation behavior in production, whole-page full-bleed variant, useBreadcrumbLink() helper, deferring navigation / controls in-header slots) can be resolved during implementation without blocking 2.0.

Rollout checklist

  • A11y review of §6, §9, §6.1 — sign-off from the a11y team.
  • Decide NavigableRegion's new home (Q2 in §12).
  • Ship @wordpress/ui/Breadcrumb per #77039.
  • Rehome NavigableRegion; update imports in edit-post, edit-site (×2), interface-skeleton.
  • Land @wordpress/admin-ui@2.0.0 — export <Page> + <Page.FullBleed> only.
  • Migrate @wordpress/boot to an AppPage wrapper that threads leading and linkComponent.
  • Document breadcrumb → router integration recipes (static, event-based, component-based).
  • Update Storybook, regenerate docs.
  • Changelog: dedicated Breaking changes section with the full migration table.

Separately tracked, not blocking 2.0:

  • Generalize useNavigateRegions in @wordpress/components to recognize native landmarks. Lets admin pages (and everything else) drop the custom NavigableRegion idiom over time.

Full plan (click to expand)

1. Product vision

@wordpress/admin-ui is not a component library. It is an admin page framework: a small set of opinionated, high-level building blocks that encode WordPress's admin page design spec as code.

The mental model should be:

Layer Purpose Flexibility Example
@wordpress/theme Design tokens (spacing, color, type, radius). — --wp-space-300
@wordpress/ui Low-level generic UI primitives (Stack, Button, Badge, Text, Card.FullBleed, etc.). High <Text>, <Badge>
@wordpress/admin-ui Page-level composition that bakes in the admin spec. Low <Page>, <Page.FullBleed>
Consumers (boot, etc.) Wire up routing, data, chrome. — <Root>, <Outlet>

Key principle: admin-ui hides decisions, @wordpress/ui exposes them. If a consumer wants full control over a breadcrumb rendering they reach for @wordpress/ui. If they want "the WordPress admin page header, done right", they reach for @wordpress/admin-ui.

This reframing drives every decision below.


2. Scope — what belongs, what does not

2.1 Does not belong

  • Breadcrumbs → move to @wordpress/ui as a generic, container-aware, routing-agnostic primitive (see §5 and UI: Add Breadcrumb component (adapted from admin-ui) #77039). admin-ui accepts breadcrumbs as data, it does not implement breadcrumbs.

  • NavigableRegion → drop from the admin-ui public API. Needs a pre-2.0 decision: PR #72106 (Oct 2025) moved the component out of @wordpress/interface into @wordpress/admin-ui and deleted the interface copy, so admin-ui's version is the canonical implementation. The four consumers — edit-post/components/layout, edit-site/components/layout, edit-site/components/save-panel, interface/components/interface-skeleton — import it from here. (The source comment referencing @wordpress/editor is stale.)

    Consequence: no "original" private API exists to migrate back to. Before admin-ui@2.0 can drop the export, NavigableRegion needs a new home. Options (decision required — see §12 Q2):

    1. Rehome to @wordpress/interface. Natural owner given interface-skeleton is the heaviest user. No API change; callers update import paths.
    2. Rehome to @wordpress/components alongside useNavigateRegions. Architecturally clean — the region primitive and the cycling hook live together — but bloats a public package.
    3. Keep in admin-ui, drop from public exports. Export as a private API via lock-unlock. Contradicts the "admin-ui drops responsibility for individual UI components" principle (§1); included for completeness.

    Whichever option is chosen, NavigableRegion itself is not modified by this work; it moves as-is.

  • Slot/Fill infrastructure → drop. createSlotFill is only used today for the mobile sidebar toggle, which is solvable with a plain prop plus a consumer-side wrapper component (§7). createSlotFill stays where it is (in @wordpress/components); it is not moved to @wordpress/ui.

  • Direct @wordpress/route dependency → drop. Routing is a concern of the consumer (§5.3 and Admin UI: Decouple Page component from @wordpress/route #77040).

2.2 Belongs

  • Page shell (<Page>) — landmarks, heading hierarchy, header content, padded content area by default (§4.3).
  • Full-bleed escape (<Page.FullBleed>) — opt-out wrapper that lets a specific content block span the full page width, bypassing the default inline padding (§4.3.a).

Everything else that a "package for admin pages" might plausibly own is explicitly not in scope for 2.0: router integration is handled by breadcrumb data plus an optional linkComponent prop (§5.3), chrome injection is a plain prop (§4.5), and cross-tree communication is the consumer's concern (not admin-ui's). Patterns for list views or split/detail layouts may land in later minors without breaking changes — not part of the initial surface.

Anything that is not specific to admin pages does not belong here.


3. API strategy — decision

Options considered:

Strategy Strength Weakness for admin-ui
Monolithic props (current) Easiest to type. Prop soup (title, subTitle, visual, badges, actions, breadcrumbs, headingLevel, hasPadding …). And constraints that should be enforced at compile time (e.g. "≤ 2 secondary actions") degrade to runtime warnings when the prop is a flat list.
Compound components (<Page.Header>, <Page.Title>, …) Ergonomic, composable. Too permissive. Consumers can re-order, duplicate or omit parts, defeating the point of an inflexible spec.
Render/slot props with typed contracts Allows structured content plus runtime validation. Awkward when only one slot varies; boilerplate; types can't always express "string-or-one-of-a-set-of-ReactNodes".
Declarative data + a few named slots, no exposed compound parts Strongest fit with the product vision: opinionated, precise. Slightly less "React-idiomatic". But we want less idiom here — we want a spec. Data is easy to validate and lint.

Decision: declarative configuration, with a minimal, named slot surface.

  • The shape of the header is data, not JSX. Where a cardinality rule can be expressed in the type system — e.g. "at most one primary action, at most two secondary actions" as a tuple union on PageActions (§4.3) — it is type-enforced, not runtime-validated. Runtime validation only covers what types can't, such as breadcrumb items that provide neither href nor onClick.
  • One narrow styling subcomponent is publicly exposed: <Page.FullBleed> (§4.3.a). It is a styling wrapper, not a structural compound part, and earns the exception for the reasons spelled out below. No other compound sub-components (<Page.Header>, <Page.Title>, <Page.Section>, …) are exposed. Internally <Page> composes a private <Header>; that composition is not part of the API surface.
  • Two tight escape hatches for content that cannot reasonably be data: visual (a decorative ReactNode) and leading (app-shell chrome, §4.5).
  • Runtime validation (dev-only) catches the few things types can't: breadcrumb items missing both href and onClick, etc. Cardinality rules that can be expressed in the type system (actions shape) are enforced at compile time — see §4.3.

This gives us the ergonomics of named fields + the safety of a schema.


4. Proposed public API

4.1 Exports (complete)

// packages/admin-ui/src/index.ts
export { Page } from './page';
// <Page.FullBleed> is attached as a static property of Page (see §4.3.a).

One component (plus Page.FullBleed as a static subcomponent). No Breadcrumbs, no NavigableRegion, no slot/fill, no Page.Section, no PageContent, no PageChromeProvider / usePageChrome, and no exported type aliases. Consumers that need a prop type use React.ComponentProps<typeof Page>; keeping named types out of the public surface shrinks the API we have to maintain and version.

Router integration is expressed as data on breadcrumb items, with an optional linkComponent prop for consumers who want their router's Link to render the markup (§5.3). Chrome injection is a plain prop on <Page> (§4.5). Padding is the default, with <Page.FullBleed> as the opt-out (§4.3.a).

4.2 <Page>

<Page
    // Required semantic identity
    title="Pages"
    // Optional header content
    subtitle="Manage static site pages"
    visual={ <Icon icon={ pages } /> /* see §4.3, always decorative */ }
    badges={ [ { label: 'Beta', intent: 'informational' } ] }
    breadcrumbs={ [
        { label: 'Dashboard', href: '/' },
        { label: 'Content' },
    ] }
    actions={ {
        primary: { label: 'Add new', onClick: onAddNew },
        secondary: [
            { label: 'Import', onClick: onImport },
        ],
        overflow: [
            { label: 'Export all', onClick: onExport },
            { label: 'Delete all', onClick: onDeleteAll, isDestructive: true },
        ],
    } }
    // App-shell injection slot (§4.5)
    leading={ /* e.g. mobile sidebar toggle */ }
    // Optional: render breadcrumb links with a custom component, e.g. a router Link (§5.3)
    linkComponent={ RouteLink }
    // Ref to the <main> landmark (§6.1), plus standard HTML pass-through
    ref={ pageRef }
    className="my-route-page"
    id="pages-route"
>
    <h2>Recent</h2>
    <Summary />
    <Page.FullBleed>
        <DataViewsTable />
    </Page.FullBleed>
</Page>

<Page> is the only component that encodes admin-page semantics. There are no publicly exposed structural compound sub-components — see §4.4 for why <Page.Section> was considered and dropped.

<Page> is forwardRef-ed to the <main> landmark (§6.1). It accepts className, id, and ref as standard pass-throughs; no other HTML attribute pass-through is supported so the component can evolve its internal markup without leaking.

4.3 Props, typed primitives, and runtime validation

Prop types of <Page> (shown for documentation; not exported):

type PageProps = {
    // Required
    title: string;

    // Optional text / layout — "subtitle" maps to the design spec's "Tagline" (short page summary)
    subtitle?: string;

    // Header slots
    visual?: React.ReactNode; // always decorative — see below
    leading?: React.ReactNode; // §4.5

    // Header data
    badges?: ReadonlyArray< PageBadge >;
    breadcrumbs?: ReadonlyArray< PageBreadcrumbItem >;
    actions?: PageActions;

    // Router integration (§5.3)
    linkComponent?: BreadcrumbLinkComponent;

    // Content
    children?: React.ReactNode;

    // Standard HTML pass-through
    className?: string;
    id?: string;
};

type PageBreadcrumbItem =
    // Link: may also attach an onClick for SPA interception (§5.3).
    | {
          label: string;
          href: string;
          onClick?: ( event: React.MouseEvent< HTMLElement > ) => void;
      }
    // Non-URL action (not a link — rendered as a <button>).
    | {
          label: string;
          onClick: ( event: React.MouseEvent< HTMLElement > ) => void;
      }
    // Current / non-interactive item.
    | { label: string };

type PageBadge = {
    label: string;
    intent?: 'informational' | 'success' | 'warning' | 'critical';
}; // non-interactive; for interactive status use `actions`

// Actions shape encodes the spec's roles (#76709):
//   - exactly 0 or 1 primary (always rendered right-aligned);
//   - 0, 1, or 2 secondary buttons (cap enforced by the tuple union below);
//   - any number of overflow actions, rendered as items inside an ellipsis menu admin-ui owns.
type PageActions = {
    primary?: PageAction;
    secondary?:
        | readonly [ PageAction ]
        | readonly [ PageAction, PageAction ];
    overflow?: ReadonlyArray< PageAction >;
};

// Shared shape for all three roles. The event target is `HTMLElement` because overflow
// items render as menu items, not `<button>`s. The final mapping onto @wordpress/ui's
// `<Button>` / menu-item surface (leading-icon vs. icon-only, disabled semantics) is
// a small integration task, not a shape decision for admin-ui.
type PageAction = {
    label: string;
    onClick: ( event: React.MouseEvent< HTMLElement > ) => void;
    icon?: React.ReactNode;
    isDisabled?: boolean;
    isDestructive?: boolean; // visual treatment; not a semantic confirmation flow
};

// Optional escape hatch for component-based routers (§5.3).
type BreadcrumbLinkComponent = React.ComponentType< {
    href: string;
    children: React.ReactNode;
    onClick?: ( event: React.MouseEvent< HTMLElement > ) => void;
    className?: string;
} >;

Observations:

  • title is required. <Page> derives its accessible name from the <h1> via aria-labelledby; there is no ariaLabel prop.
  • No hideTitle prop. The spec (Admin UI: Page header design spec #76709) defines the rule: "when breadcrumbs are shown, the page title should be hidden (but still present) to avoid visually duplicating page info". <Page> implements that rule automatically — if breadcrumbs is non-empty, the <h1> is wrapped in <VisuallyHidden> (kept in the DOM for aria-labelledby); otherwise it renders visibly. Consumers make no decision.
  • breadcrumbs is data, not <Breadcrumbs> JSX. <Page> renders the primitive from @wordpress/ui internally. That is how routing becomes pluggable (§5.3).
  • actions is role-shaped, not a flat list. primary is a single object (never multiple), secondary is a tuple capped at two elements by the type itself, and overflow is the ellipsis-menu bucket. The spec's rules (Admin UI: Page header design spec #76709 — 1 primary, ≤ 2 secondary, tertiary behind an ellipsis menu) are expressed at the type level and cannot be violated without a compile error; runtime validation has nothing to enforce on this front. Ordering is owned by admin-ui per the spec ("primary button is always positioned to the right"); consumers do not author order.
  • overflow items are rendered as menu items inside an ellipsis-menu button admin-ui emits. Admin-ui owns the menu's ARIA (aria-haspopup="menu", keyboard behavior, focus return). Consumers do not supply the menu or its trigger.
  • PageAction is shared across all three roles. The final visual mapping onto @wordpress/ui's <Button> / menu-item surface (leading-icon vs. icon-only, disabled semantics, destructive styling) is a small integration task; none of it changes the admin-ui prop shape.
  • visual is a plain React.ReactNode and is always decorative: admin-ui renders it inside a wrapper with aria-hidden="true". Informative imagery belongs in the content area with its own alt text, not in the page-title visual slot. This keeps the header's accessible name exactly the title. Consumers pass whatever they like — <Icon icon={…} />, an <img alt="">, an emoji, nothing.
  • No free-form headingLevel prop. <Page> is always h1. Content-area headings are the consumer's responsibility and should use h2 for top-level blocks (see §4.4 and §6).
  • No density, size, or padding props. All considered and rejected as speculative: admin pages use one canonical density and layout from the design system, padding defaults to on with <Page.FullBleed> (§4.3.a) as the only escape. Any of these can be added later with an explicit, spec-backed value if a real need appears.
  • Responsive header behavior is internal, not configurable. <Page> implements the spec's responsive rules (actions overflowing to the ellipsis menu, breadcrumb collapsing, tagline truncation on scroll, hamburger revealing at the mobile breakpoint) via ResizeObserver on the page header — container-aware, not viewport-aware. No prop opts in or out.

Runtime validation (dev-only):

if ( process.env.NODE_ENV !== 'production' ) {
    assertPagePropsValid( props );
}

Rules enforced:

  • breadcrumbs: all but the last must have href or onClick.
  • (Actions cardinality rules are type-enforced via PageActions, not runtime-validated.)

Errors are thrown in development; silent in production (see §13).

4.3.a Padding: default + <Page.FullBleed> escape

<Page> applies the canonical admin-page inline padding by default — header and content use the same value from @wordpress/theme. No prop is required. Most admin pages want this and should not have to think about it.

For the specific case where a single content block needs to span the full page width (the canonical example is a DataViews-style list/table that aligns with the outer container), consumers wrap that block in <Page.FullBleed>:

<Page title="Pages">
    <h2>Recent</h2>
    <Summary />

    <Page.FullBleed>
        <DataViewsTable />
    </Page.FullBleed>

    <Footer />
</Page>
  • <Page.FullBleed> neutralizes the page's inline padding for its children — typically via negative inline margins sized from the same token the page uses, so the two cannot drift.

  • Accepts all standard <div> props (className, id, style, role, aria-*, data attributes, children, …). ref is forwarded to the underlying <div>. No admin-ui-specific knobs (no size, no variant) — the only thing this component does is neutralize the page's inline padding.

    type PageFullBleedProps = React.ComponentPropsWithRef< 'div' >;
  • Valid only inside <Page> (nothing outside <Page> has a padding to neutralize). This is stated in the docs; no runtime dev warning is shipped in 2.0. If misuse shows up in practice, a warning can be added later without an API change.

Pattern precedent: Card.FullBleed in @wordpress/ui (packages/ui/src/card/full-bleed.tsx). Contributors already know the semantics.

Why no padding prop up front: the default is correct for most pages; a two-value prop forces every consumer to decide and encodes a bet about which cases exist. <Page.FullBleed> inverts the default at the exact content-tree location where the decision is made. Padded header + full-bleed table is a recognized admin UI pattern (Notion, Linear, GitHub settings, WP admin). If a whole-page full-bleed variant ever becomes a real need, we add a prop then with a spec-backed value.

On the compound-component trade-off: §3 rejects compound patterns as too permissive. <Page.FullBleed> earns the pattern anyway because it's a styling wrapper, not a structural component — one narrow, named affordance ("this block is full-bleed"), namespaced to telegraph the "only valid inside <Page>" constraint. <Page.Section> failed because it was both too weak (enforced little) and too opinionated (fixed title shape); <Page.FullBleed> is strong (neutralizes a specific rule) and opinionless about content.

4.4 No <Page.Section> — and why

A <Page.Section> component was considered and rejected. It would have:

  1. Wrapped children in <section aria-labelledby={generatedId}>.
  2. Generated the id and rendered an <h2 id={generatedId}>{title}</h2>.
  3. Enforced h2 for section headings.
  4. Applied some vertical rhythm.

Each is weak in practice:

  • (1)–(2) are three lines of consumer JSX; the aria-labelledby wiring is documented in the README.
  • (3) is enforced by the API, not by the DOM — a consumer who puts <h3> inside still ships <h3>. Lint / axe catch this regardless.
  • (4) is styling, cleaner on the page-content wrapper.
  • The title shape is inflexible. Real admin-page sections combine title + description + action + status + icon in ways that vary by page type; a fixed shape is wrong for most, and a permissive shape starts replicating <Page>'s header at a smaller scale.

Consequence: admin-ui does not ship <Page.Section>. Content inside <Page> uses <section aria-labelledby> where appropriate, composed from @wordpress/ui primitives. Validated by a11y tests (§9, §10). If practice shows a common shape emerging, we revisit — not before.

4.5 leading — the one chrome injection point

App shells sometimes need to decorate every page's header with a piece of chrome that the page itself does not know about — the canonical example is boot's mobile sidebar toggle. <Page> accommodates this with a single plain prop:

leading?: React.ReactNode;
  • Rendered in the header row, as the leading item before the visual / title cluster. This hypothesis mirrors where today's SidebarToggleSlot sits in packages/admin-ui/src/page/header.tsx, so existing integrations carry over without visual change.

  • Design feedback still required. Admin UI: Page header design spec #76709 illustrates the hamburger appearing at a specific mobile breakpoint; the final position (in-row vs. on its own line above the breadcrumbs, size/alignment, responsive behavior) should be confirmed by design before we freeze the spec. Adjusting the internal render location is not a breaking change; the prop itself is stable.

  • A plain ReactNode, not a render prop (nothing about the rendering is dynamic per-invocation) and not a slot/fill or context (both add DI infrastructure the package does not need).

  • Admin-ui does not ship a provider for this. If a shell wants every page to receive the same node, it defines a one-line wrapper:

    // boot:
    const AppPage = ( props ) => (
        <Page
            leading={ isMobileViewport ? <MobileSidebarToggle /> : undefined }
            { ...props }
        />
    );

    Routes render <AppPage> instead of <Page>. That wrapper is boot's concern, not admin-ui's.

4.6 No PageChromeProvider / context / slot-fill / render-prop functions

Admin-ui ships no public DI infrastructure — no slot/fill, no exported context, no provider, no hook, no render-prop functions. leading is a plain ReactNode prop (§4.5); router integration uses breadcrumb item data (href, onClick) plus an optional linkComponent component type (§5.3). The "one place, many pages" case is handled by a consumer wrapper component (§11 — e.g. boot's AppPage), not a provider.


5. Decoupling: components, routing, breadcrumbs

5.1 Drop @wordpress/components; consolidate on @wordpress/ui

Current admin-ui imports from @wordpress/components are replaced entirely:

Current Replacement
__experimentalHeading (inside the Breadcrumbs) Removed. @wordpress/ui/Breadcrumb no longer renders a heading (§5.2). <Page>'s own <h1> is a native heading, styled with <Text render={ <h1 /> } /> from @wordpress/ui.
__experimentalHStack / HStack <Stack direction="row"> from @wordpress/ui.
createSlotFill (sidebar toggle) Plain leading prop on <Page> (§4.5).
SlotFillProvider in consumers No longer needed for admin-ui (consumers may still use it for their own reasons).
Badge for PageBadge <Badge> from @wordpress/ui.

@wordpress/ui component catalog actually used by admin-ui 2.0 (verified against packages/ui/src/index.ts):

Component Exists in @wordpress/ui today? Used for
Stack yes header layout
Text yes (with variant + render) title, subtitle, section headings
Badge yes PageBadge
Button yes PageAction
Icon yes icons inside visual / action buttons
VisuallyHidden yes hiding the <h1> when breadcrumbs are set
Breadcrumb no (#77039) new component, ships before admin-ui 2.0

Card.FullBleed exists in @wordpress/ui (packages/ui/src/card/full-bleed.tsx) and is not consumed by admin-ui. It is referenced separately in §4.3.a as pattern precedent and naming/semantics source for <Page.FullBleed>. No runtime dependency.

After this, admin-ui depends on @wordpress/ui, @wordpress/theme, @wordpress/i18n, clsx — and nothing else from the components ecosystem. Where no @wordpress/ui component fits (e.g. custom layout rules for the header grid), we write plain CSS with design tokens from @wordpress/theme. No ad-hoc values.

All user-facing strings (accessible labels, dev-validation messages shown in UI) are marked for translation with __() / _x() from @wordpress/i18n. Nothing is hard-coded English.

5.2 Move Breadcrumbs to @wordpress/ui (container-aware, router-agnostic)

This is #77039. Concrete shape of the new @wordpress/ui/Breadcrumb:

  • Container-aware via ResizeObserver. When the available inline size drops below a measured threshold, items collapse to an overflow menu (middle items first, keeping the root and the current). Not tied to viewport media queries.

  • Data-first, opt-in component rendering. Items carry href and/or onClick directly. The component renders:

    • href only, no linkComponent → <a href> (static link).
    • href + onClick, no linkComponent → <a href onClick> (SPA link; consumer preventDefaults if they want to intercept).
    • href + linkComponent → renders the consumer's component, passing { href, children, onClick?, className? }.
    • onClick only → <button type="button" onClick> (non-URL action). linkComponent does not apply to buttons.
    • Neither → non-interactive text with aria-current="page" (the current item).

    There is no provider and no function render-prop. The integration point is a single optional linkComponent: React.ComponentType<…> on the container (<Page> in admin-ui's case, <Breadcrumb> in @wordpress/ui).

  • Accessibility: <nav aria-label={ translated 'Breadcrumb' }>, <ol>, aria-current="page" on the last item regardless of whether that item is a link, a button, or plain text (per WAI-ARIA Authoring Practices – Breadcrumb). Proper collapsed-menu ARIA for the overflow state.

  • External breadcrumb links are out of scope. Breadcrumbs represent the hierarchy of the current admin surface; they are assumed internal. target, rel, and download are not part of the contract. Consumers that need external links in navigation use regular <a> elements outside the breadcrumb component.

  • Does not own the page h1 (the current admin-ui Breadcrumbs does, which is wrong — it only makes sense because the component lives inside a Page header; the primitive must not make that assumption).

Admin-ui consumes this primitive internally for its breadcrumbs prop and renders the h1 separately and unconditionally.

5.3 Decouple from @wordpress/route (#77040): data + linkComponent

@wordpress/admin-ui has no import from @wordpress/route. <Page> exposes two integration surfaces, both plain props:

  1. Breadcrumb item data (href, onClick) — for the common case where the item is a static URL, an SPA link with click interception, or a non-URL action.
  2. linkComponent? — a single optional React component type that admin-ui uses to render items with href. Lets consumers plug in their router's <Link> when they want the extras it provides (prefetching, active state, client-side routing semantics).

The fixed contract for linkComponent:

type BreadcrumbLinkComponent = React.ComponentType< {
    href: string;
    children: React.ReactNode;
    onClick?: ( event: React.MouseEvent< HTMLElement > ) => void;
    className?: string;
} >;

href is always passed to linkComponent (admin-ui normalizes the shape regardless of what a given router's component uses internally). Routers whose Link uses a different prop name are adapted at the call site with a one-line component. No consumer ever imports from @wordpress/ui to wire routing.

How each router pattern integrates:

Static <a href> (no JS routing). Just set href, don't pass linkComponent:

breadcrumbs={ [
    { label: 'Dashboard', href: '/wp-admin/' },
    { label: 'Pages', href: '/wp-admin/edit.php?post_type=page' },
    { label: 'Edit' },
] }

Event-based / imperative router (exposes navigate(url), no Link component). Attach navigation in onClick; keep href so the link still works without JS and so middle/cmd-click still open the target via the browser default:

breadcrumbs={ [
    {
        label: 'Dashboard',
        href: '/',
        onClick: ( event ) => {
            event.preventDefault();
            router.navigate( '/' );
        },
    },
    { label: 'Pages' },
] }

(Whether to defer to the browser on modifier / middle clicks is a consumer decision and out of scope for admin-ui. <Page> simply forwards the event.)

Component-based router (@wordpress/route, React Router, etc. — Link uses to). Define a one-line adapter in the shell and pass it once via linkComponent:

import { Link } from '@wordpress/route';

const RouteLink = ( { href, children, ...rest } ) => (
    <Link to={ href } { ...rest }>{ children }</Link>
);

<Page breadcrumbs={ [ … ] } linkComponent={ RouteLink } />

(Routers with strictly-typed route tables — TanStack, React Router v6 type-safe mode — may require a typed cast in the adapter; that's a one-time shell concern, not a per-page one.)

Component-based router whose Link already uses href (Next.js et al.): pass the component directly.

5.4 Reducing repetition: the AppPage wrapper threads both props

Both leading (§4.5) and linkComponent are configured identically by the app shell — once, in a thin AppPage wrapper — so consumer route pages never touch either:

// boot/app-page.tsx
import { Page } from '@wordpress/admin-ui';
import { Link } from '@wordpress/route';

const RouteLink = ( { href, children, ...rest } ) => (
    <Link to={ href } { ...rest }>{ children }</Link>
);

export const AppPage = ( props: React.ComponentProps< typeof Page > ) => (
    <Page
        leading={ isMobileViewport ? <MobileSidebarToggle /> : undefined }
        linkComponent={ RouteLink }
        { ...props }
    />
);

Route pages — including third-party plugins inside boot — render <AppPage> and get both shell chrome and router integration for free. Pages outside boot render <Page> and choose what (if anything) to pass; they will not participate in boot's chrome, which is the intended boundary.

5.5 Why linkComponent over a provider or function render-prop

Consumers don't import from sibling packages or configure providers to wire routing. Event-based routers and static links work out of the box; component-based routers plug in via a one-line adapter — a component type, not a render-prop function, so it composes with React.memo. Progressive enhancement comes for free: href is a real URL and works without JS; onClick is a pure enhancement.

This closes #77040 (no router code in admin-ui), keeps the consumer's dependency surface on admin-ui only, and supports event-based and component-based routers equally well.


6. Document hierarchy & semantics (non-negotiable)

Pending a11y review. The defaults below are our proposal; before finalizing, the spec needs sign-off from WordPress a11y reviewers (e.g. Joe Dolson and the a11y team). The <main> vs. useNavigateRegions decision in §6.1 is the most likely item to warrant discussion.

<Page> is responsible for a correct, predictable document skeleton. This is the main reason the package exists.

Baseline output (labels shown in English for readability; all are translated with __() / _x() from @wordpress/i18n). The readable suffixes on class="[hashed] …" are there to help the reader identify each element — the actual output is hashed class names only, per §8.1:

<main class="[hashed]" aria-labelledby="[generated-page-title-id]">
    <header class="[hashed]">
        <nav aria-label="Breadcrumb">...</nav>
        <div class="[hashed] header-row">
            <!-- `leading` renders as the leading item of the header row (hypothesis from §4.5; pending design sign-off on #76709). -->
            <div class="[hashed] leading">...</div>
            <div class="[hashed] visual" aria-hidden="true">...</div>
            <h1 id="[generated-page-title-id]">Pages</h1>
            <!-- Badges rendered adjacent to the title, not as part of it. Non-interactive. -->
        </div>
        <!-- Subtitle uses `<Text render={ <p /> } />` from @wordpress/ui (spec calls this the "Tagline"). The exact variant is chosen from the design tokens / spec — do not hard-code. -->
        <p class="[hashed] subtitle">Manage static site pages</p>
        <!--
          Actions group. Label is a generic, fixed, translated string.
          Order of children is fixed by admin-ui, not by the consumer:
          secondary buttons → (ellipsis menu, if `overflow` is non-empty) → primary button (right-aligned per #76709).
          The ellipsis button is labelled "More actions" (translated); opening it reveals a role="menu" with the overflow items.
        -->
        <div class="[hashed] actions" role="group" aria-label="Actions">
            <button>Import</button>
            <button aria-haspopup="menu" aria-expanded="false" aria-label="More actions">...</button>
            <button class="[hashed] primary">Add new</button>
        </div>
    </header>

    <!-- Consumer-authored content. Inline padding is the admin-page default; <Page.FullBleed> neutralizes it per-block. -->
    <div class="[hashed] content">
        <!-- Sections, if used, are <section aria-labelledby> with <h2>. -->
    </div>
</main>

Rules the component guarantees:

  • The page landmark is <main>, not a generic region. There is exactly one <main> per rendered <Page>.
  • The page title is always <h1>. When breadcrumbs is non-empty the <h1> is wrapped in <VisuallyHidden> (per Admin UI: Page header design spec #76709: "when breadcrumbs are shown, the page title should be hidden but still present"). It remains in the DOM so aria-labelledby and AT navigation still work; only the visible rendering is suppressed. No consumer-facing prop controls this.
  • The visual element is always decorative — admin-ui wraps it with aria-hidden="true" unconditionally. Informative imagery belongs in the content area.
  • Badges sit alongside the title but outside the <h1> (current behavior is sometimes inside the heading — confusing for AT) and are non-interactive.
  • Actions are wrapped in a group labelled "Actions" (generic, fixed, translated).
  • The header responds to its container size (ResizeObserver, not viewport media queries): actions overflow to the ellipsis menu, breadcrumbs collapse to a middle-truncated form, the tagline truncates on scroll, and the hamburger (leading) reveals at the mobile breakpoint per Admin UI: Page header design spec #76709. This is internal behavior; no prop configures it.

Rules documented for consumer-authored content (enforced by tests, not by a component):

  • Top-level content blocks should be <section aria-labelledby={id}> with an <h2 id={id}>. From @wordpress/ui, <Text render={ <h2 /> }> (with the heading variant chosen from the design spec) is the canonical primitive.
  • Heading order is monotonic: no <h3> without a preceding <h2>; no level skipping.
  • Inline padding is the admin-page default, applied by <Page>. Blocks that need full width use <Page.FullBleed> (§4.3.a). Content-specific spacing inside the page uses @wordpress/theme tokens, not hard-coded values.

6.1 <main> vs. useNavigateRegions — explicit trade-off

<Page> renders a plain <main>. It does not add role="region" or tabIndex="-1", and therefore does not participate in the useNavigateRegions (@wordpress/components) cycle by default.

Why:

  • useNavigateRegions matches a hard-coded selector: [role="region"][tabindex="-1"]. It does not recognize native landmarks (<main>, <nav>, <aside>, …).
  • Adding role="region" to <main> overrides the implicit main role (author role wins), downgrading the landmark to a generic named region. We want to keep the strongest landmark.
  • Nesting (<main><section role="region" tabindex="-1">) reintroduces the NavigableRegion-style wrapper we are deleting.
  • tabIndex="-1" only matters for programmatic focus. Route-change focus management is a consumer concern, not a <Page> concern. <Page> forwards a ref to its <main> element so consumers that need to call .focus() on route changes can do so.

Consequence: the existing NavigableRegion instances in editor chrome (interface-skeleton emits them for header, sidebars, content, actions, footer; edit-post / edit-site / save-panel add more) keep cycling under Ctrl+` / Alt+Shift+N,P. The cycle simply does not include the admin page itself. This matches the spirit of the hook — it's most useful for moving within chrome, not for picking the page. (Wherever NavigableRegion is rehomed per §2.1 and §13 Q2, it continues to work unchanged.)

Follow-up (separate task, @wordpress/components): generalize useNavigateRegions to recognize native landmarks (main, nav, aside, labelled section, …) and handle focus on elements without a pre-set tabindex (either by setting it imperatively before .focus() or by using { preventScroll: true } and tolerating the focus-outline story). This unlocks "use real landmarks" codebase-wide, not just in admin-ui, and removes the custom NavigableRegion idiom over time. Tracked separately from the admin-ui 2.0 work; a11y review should confirm the approach before we implement.

(If it turns out admin pages genuinely need to participate in the cycle before the useNavigateRegions generalization lands, the fix is implemented there — inside @wordpress/components — not by adding a prop to <Page>. This keeps admin-ui's API spec-backed rather than an accumulation of toggles.)


7. Retiring createSlotFill without replacing it with DI

Today: Page.SidebarToggleFill in <Root> teleports a button into <SidebarToggleSlot> via @wordpress/components slot/fill + SlotFillProvider. The replacement:

  • <Page> exposes one plain ReactNode prop, leading, for header chrome (§4.5).
  • The app shell (boot) defines a one-line AppPage wrapper that forwards state-driven chrome to <Page> as leading.
  • Route components render <AppPage> instead of <Page>. A PageChromeProvider context was considered and rejected: an ancestor→descendant DI step is handled better outside admin-ui, by a wrapper component in the shell.

After migration:

// boot/app-page.tsx
export const AppPage = ( props ) => (
    <Page
        leading={ isMobileViewport ? <MobileSidebarToggle /> : undefined }
        { ...props }
    />
);

// route page
<AppPage title="…">…</AppPage>

(Page.SidebarToggleFill + SlotFillProvider go away on both sides.)

Benefits over slot/fill and context: no DI infrastructure shipped by admin-ui, no SlotFillProvider required by consumers for this feature, every integration point on <Page> is a plain prop with an obvious call stack (easier to reason about in tests, Storybook, SSR), and the shell is explicit about what it decorates pages with in exactly one place (AppPage).

Nesting <Page> (two landmarks on one screen) is unsupported — it violates the "exactly one <main>" invariant in §9. Route-level modals should render a role="dialog" with their own header, not another <Page>.


8. Styling & build

8.1 CSS modules, logical properties, tokens

  • All styles are authored as CSS modules (*.module.scss or *.module.css), colocated with components. No global selectors like .admin-ui-page in the authored CSS; consumers get hashed class names and can't accidentally override internals. (Design-token references such as var(--wp-space-300) and semantic custom properties set at the Page root remain global — custom properties are intentionally global.)
  • 100% logical properties (padding-block, margin-inline-start, inset-inline-end). This is already partially true and must be enforced via a stylelint rule (@wordpress/stylelint-config's logical-props rule or equivalent).
  • All spacing, color, type, radius values come from @wordpress/theme tokens. No hard-coded 24px, no raw #fff. If a value is used that has no theme-token equivalent, file a gap on @wordpress/theme rather than inlining a literal.
  • A few semantic CSS custom properties at the Page level (--admin-ui-page-padding-inline) so <Page.FullBleed> can reference the exact same value for its negative margin.
  • @wordpress/base-styles dependency: removed. If a utility is needed, pull the token from @wordpress/theme; otherwise write the few lines of plain CSS.

Supersedes / subsumes #77032.

8.2 package.json hygiene

{
    "name": "@wordpress/admin-ui",
    "sideEffects": [
        "**/*.css",
        "**/*.scss"
    ],
    "files": [
        "build",
        "build-module",
        "build-style",
        "build-types",
        "CHANGELOG.md",
        "README.md"
    ],
    "exports": {
        ".": { "types": "./build-types/index.d.ts", "import": "./build-module/index.mjs", "require": "./build/index.cjs" },
        "./style": "./build-style/style.css",
        "./package.json": "./package.json"
    }
}

Changes vs. today:

  • sideEffects patterns cover built and source stylesheets (**/*.css catches CSS-modules output). The current "src/**/*.scss" only makes sense when consumers import source, which they should not.
  • src is removed from files (we do not ship source). Drop "react-native": "src/index" unless there is an actual RN consumer; if there is, we need a dedicated build, not a source re-export.
  • ./style export is explicit. Stylesheet shipping becomes a documented choice instead of an implicit side effect.

8.3 Build

  • TypeScript strict, noUncheckedIndexedAccess enabled.
  • No any in the admin-ui source (NavigableRegion is removed from admin-ui and, per §2.1, is not modified as part of this work).
  • ESM-first; CJS kept while monorepo requires it.

9. Accessibility requirements (explicit contract)

Captured here as testable invariants:

  1. Exactly one <main> per <Page> render.
  2. Exactly one <h1> emitted by <Page> per render, carrying the accessible name from title. When breadcrumbs is non-empty, the <h1> is visually hidden (via <VisuallyHidden>) but remains in the DOM with the same accessible name. Consumer-authored <h1>s inside content are a consumer concern and are flagged by axe, not by <Page>.
  3. aria-current="page" on the last breadcrumb item, regardless of how it is rendered (per WAI-ARIA APG).
  4. The visual slot is always wrapped in aria-hidden="true" and rendered outside the heading.
  5. Actions group has a fixed, translated accessible label ("Actions").
  6. All interactive header elements have visible and programmatic names (enforced by axe in tests).
  7. Color contrast tested against the current @wordpress/theme palette in light and dark.
  8. Tab order follows DOM order: breadcrumbs → leading → header actions → content. (Per the §6 baseline HTML, <nav aria-label="Breadcrumb"> is a sibling above the title row, and leading sits inside the title row before the visual/title cluster.) The <h1> is non-interactive and is skipped, as expected.
  9. Reduced-motion honored for any internal transitions (currently none; keep it that way).
  10. Heading order inside <Page> content is monotonic (no skipped levels). Validated by axe in the integration tests against a representative content fixture; consumer-authored content is otherwise their responsibility.

Each item is backed by unit tests (§10).


10. Testing plan

The package ships with:

  • Unit tests (RTL + jest-axe) — one test file per component, covering:
    • Invariants 1–10 from §9.
    • Dev-validation errors (correct messages, only thrown in dev).
    • leading renders in the header; absent when undefined. visual is always rendered inside an aria-hidden wrapper.
    • Default inline padding applies; <Page.FullBleed> neutralizes it for its subtree (box-model assertions).
    • Breadcrumb item shape matrix: href only → <a href>; href + onClick → <a href onClick> with onClick invoked and preventDefault available; onClick only → <button>; neither → non-interactive text. The last item always carries aria-current="page" regardless of interactivity.
    • linkComponent is used for items with href and not for <button>-rendered items; contract props are passed as declared.
    • Actions ordering: secondary → ellipsis trigger (when overflow non-empty) → primary in DOM order; primary is visually right-aligned.
    • Overflow menu: ellipsis trigger has aria-haspopup="menu" and translated name ("More actions"); opening reveals a role="menu" with role="menuitem" children; arrow keys, Escape, and focus-return on close all work.
    • Actions cardinality is compile-time enforced: three items to secondary fails the build (type tests).
  • Integration tests — a small suite that mounts <Page> with representative content including <section aria-labelledby> blocks and a <Page.FullBleed> block, and:
    • Runs axe against it in every variant combination. Matrix axes: with/without breadcrumbs (drives the auto-hidden-title branch) × with/without badges × actions shape (none, primary only, secondary only, primary + 1 secondary, primary + 2 secondary, overflow only, primary + 2 secondary + overflow) × with/without visual × with/without leading × with/without Page.FullBleed × with/without linkComponent × LTR / RTL.
    • Asserts landmark uniqueness and heading order using @testing-library/react's getByRole('main'), getAllByRole('heading', { level: 1 }), etc.
    • Asserts the breadcrumbs-drives-hidden-title rule at both ends: breadcrumbs non-empty → <h1> is in the DOM but has an accessible-but-not-visible presentation; breadcrumbs empty → <h1> is visible.
  • Storybook + visual regression — a11y addon enabled, stories cover the matrix, and snapshots are wired into the existing Chromatic / Playwright pipeline. Stories live in /stories and are imported by docs.
  • Type tests (tstyche or @ts-expect-error comments) — exhaustiveness of the PageBreadcrumbItem discriminated union, the linkComponent contract, and that disallowed combinations fail at compile time.

Route-change focus management is out of scope for admin-ui and not covered by this test matrix; consumer shells are responsible for it.

Coverage target: ~95% of src/ statements, 100% of invariants in §9.


11. Migration plan (breaking changes welcome)

Since we are explicitly accepting breaking changes, we publish a single major (@wordpress/admin-ui@2.0.0) that lands the redesign wholesale. A soft-deprecation period is not worth the double maintenance cost for a package with few external consumers.

11.1 Breaking changes (vs. current)

Change Migration
Breadcrumbs removed. Pass breadcrumbs data to <Page>, or import Breadcrumb directly from @wordpress/ui.
NavigableRegion removed from admin-ui. After rehoming per §13 Q2, update import paths in edit-post/components/layout, edit-site/components/layout, edit-site/components/save-panel, and interface/components/interface-skeleton. The component itself is unchanged.
Page.SidebarToggleFill removed. Define a thin AppPage wrapper in the shell that forwards chrome as leading to <Page> (§4.5). No provider, no slot/fill.
Page prop headingLevel removed. Title is always <h1>. Consumer-authored top-level content blocks are <h2>.
hasPadding: boolean removed. Padding is on by default. Use <Page.FullBleed> to opt a single content block out (§4.3.a).
subTitle → subtitle (casing consistency with WordPress conventions). Rename prop.
ariaLabel removed; <Page> derives its accessible name from the <h1> via aria-labelledby. Stop passing ariaLabel; title is now required.
No hideTitle prop. Behavior is automatic: when breadcrumbs is non-empty the <h1> is visually hidden (per #76709). Consumers stop passing hideTitle; there is nothing to opt into.
actions is role-shaped: { primary?, secondary?, overflow? }, not a flat array with a variant field. Group actions by role. Primary button → primary; up to two secondary buttons → secondary: [a] or [a, b] (third element is a compile error); tertiary / long-tail actions → overflow. Admin-ui renders the ellipsis menu; do not provide one. Array order no longer influences render order.
visual type narrowed to a plain decorative ReactNode. Pass <Icon icon={…} /> or an <img alt=""> directly; drop the { kind, … } shape. Informative imagery moves to the content area.
Routing coupling removed. Attach navigation on breadcrumb item onClick, keep href for progressive enhancement, or pass linkComponent for component-based routers (§5.3).
No size, density, or exported type aliases. One canonical layout / density; use React.ComponentProps<typeof Page> if a prop type is needed.

11.2 Rollout steps

  1. A11y review of the spec. Before any code lands, share §6 (semantics), §9 (invariants), and §6.1 (the <main> / useNavigateRegions trade-off) with the WordPress a11y team (e.g. Joe Dolson) and collect sign-off or required adjustments. Freeze the contract after this step.
  2. Land @wordpress/ui/Breadcrumb (UI: Add Breadcrumb component (adapted from admin-ui) #77039) with container-aware behavior, the data-first { href, onClick } item shape, and an optional linkComponent prop for component-based routers (no provider, no function render-prop). Ship in a UI release.
  3. Rehome NavigableRegion per the decision on §13 Q2 (options listed in §2.1). Because no "original private API" exists today (PR Extract Page and NavigableRegion components to an admin-ui package #72106 moved it into admin-ui and deleted the interface copy), this is a prerequisite for step 4, not an incidental cleanup. The component itself is not modified — it moves as-is. The four consumer packages (edit-post, edit-site × 2, interface) update their imports.
  4. Land admin-ui@2.0.0 exporting only <Page> (with Page.FullBleed) — no Breadcrumbs, NavigableRegion, slot-fill, Page.Section, PageContent, or PageChromeProvider. Router integration is the optional linkComponent prop on <Page>.
  5. Migrate boot to a thin AppPage wrapper (exported from boot) that forwards leading to <Page>; drop <SlotFillProvider> if not otherwise needed. Route pages inside boot — including third-party plugins — import AppPage from @wordpress/boot; pages outside boot import Page from @wordpress/admin-ui. Document this boundary explicitly in boot's README so plugin authors understand the split.
  6. Document breadcrumb → router integration (§5.3) with concrete recipes for static links, event-based routers, and component-based routers (including @wordpress/route, React Router, and Next.js); optionally ship a useBreadcrumbLink() convenience helper in @wordpress/route.
  7. Update Storybook stories and regenerate docs.
  8. Changelog: write a dedicated Breaking changes section with a migration table (§11.1 verbatim).

Separately tracked, not a prerequisite for 2.0:

  • Generalize useNavigateRegions (in @wordpress/components) to recognize native landmarks (<main>, <nav>, <aside>, labelled <section>) and handle focus without requiring tabindex="-1" to already be set. Deliverable: an issue in @wordpress/components with the proposal in §6.1; implementation follows after a11y confirms the approach. When this lands, admin pages pick up navigate-regions participation with no change to admin-ui.

11.3 Risk checklist

  • Any external consumer of Breadcrumbs / NavigableRegion from admin-ui (none visible in-repo outside the places listed). Cover with a forward-only migration note.
  • Slot/Fill removal is invisible to end users; only boot is affected.
  • actions shape restructure: in-repo consumers currently pass a flat array. Each call site has to regroup into { primary?, secondary?, overflow? } — a manual edit, not a codemod (the input is too underspecified to infer role reliably). In-repo surface is small; no automation planned.
  • <main> landmark uniqueness: audit any page that embeds another <Page> (shouldn't happen; nesting is unsupported per §7 and §9, but assert in tests).
  • RTL: CSS-modules migration should not regress RTL. Add visual snapshots in RTL mode.

12. Open questions and follow-ups

Open questions (to resolve before or during implementation)

Ordered roughly by how close they sit to blocking 2.0 — a11y sign-off and the NavigableRegion rehoming are gates; the rest can be decided during implementation.

  1. A11y sign-off on the spec. §6 and §9 encode the accessibility contract; they need review by the WordPress a11y team (e.g. Joe Dolson) before 2.0 ships. Specifically to confirm: single <main> per page, <h1> present even when visually hidden (auto-hidden when breadcrumbs are set, per Admin UI: Page header design spec #76709), aria-labelledby wiring, decorative-visual handling, actions group label ("Actions"), aria-current="page" on the last breadcrumb item regardless of interactivity, and the default of not making <Page> participate in useNavigateRegions (§6.1). Gating.

  2. Where does NavigableRegion live after admin-ui drops the export? Options listed in §2.1: rehome to @wordpress/interface (natural owner), rehome to @wordpress/components (lives next to useNavigateRegions), or keep inside admin-ui as a non-public export via lock-unlock. The component itself is not modified either way. Gating for step 4 of the rollout.

  3. Header navigation and controls slots (Admin UI: Page header design spec #76709). The design spec lists two optional in-header elements not in this proposal: navigation (in-header horizontal nav with horizontal-scroll overflow) and controls (search / DataViews controls, which responsively stack with navigation). Decision for 2.0:

    • Responsive header stacking ships in 2.0. The rules governing overflow, collapsing, tagline truncation, and the mobile hamburger are internal ResizeObserver-driven behavior (§4.3 and §6). No prop surface.
    • navigation slot does not ship in 2.0. Design spec is retained as reference; the prop lands in a later minor when the first consumer needs it. Non-breaking addition.
    • controls slot does not ship in 2.0. Same reasoning. The spec couples its responsive behavior to navigation, so shipping one without the other would be inconsistent — both land together.
  4. Dev validation: throw or warn in production? Default to "throw in dev, silent in production". If consumer apps want to fail loudly in production previews, surface that as a module-level flag on admin-ui (not a provider) — the package intentionally ships no provider (§4.6).

  5. Whole-page full-bleed variant? Out of scope for 2.0. Default is padded, <Page.FullBleed> is per-block. If a real need appears for an entirely edge-to-edge page (including the header), add a <Page> prop with an explicit spec-backed value — not before. See §4.3.a.

  6. Convenience helper for router integration. useBreadcrumbLink() helper shipped in @wordpress/route to remove boilerplate in consumer code — cheap, not strictly required. Decide during §11.2 step 6.

Separately tracked follow-ups (not blocking 2.0)

  • Generalize useNavigateRegions in @wordpress/components to recognize native landmarks (<main>, <nav>, <aside>, labelled <section>) and to handle focus on elements without a pre-set tabindex. Rationale and approach: §6.1. Owner: @wordpress/components. A11y team should review the selector + focus-management change before implementation. Once landed, admin pages automatically participate with no change to admin-ui.
  • navigation / controls slots on <Page>. Deferred per Q3 above. Adding either is a non-breaking minor; revisit when a consumer needs them.
  • Split / detail layout patterns — not part of 2.0; may land in later minors if a need materializes.

Activity

  1. added
    [Type] Enhancement
    Design System
    [Package] Admin UI
    on Apr 23, 2026
  2. added
    [Package] UI
    Needs Decision
    on Apr 24, 2026
  3. ciampo commented on Apr 24, 2026

    @ciampo
    ContributorAuthor

    To external contributors: please do not open PRs for this issue; the spec is still under discussion.

    This is an initial draft that I started working on last week. While we likely don't have the capacity to iterate on this right now, I'm opening an issue to provide a starting point. We can come back to this later.

    cc @WordPress/gutenberg-components @WordPress/gutenberg-design @simison @CGastrell

  4. aduth commented on Apr 24, 2026

    @aduth
    Member
    • One public component. <Page> (with <Page.FullBleed> as a static property).

    What's the advantage of a subcomponent over a prop, particularly if the component is otherwise monolithic and its other aspects will be configured through props?

    Separately, as this starts to take shape, maybe this issue should serve more as a tracking issue, with discrete tasks broken out into their own sub-issues? That's already the case for a lot of the work described in the original issue, but there's still some gaps (e.g. element semantics). Correct me if I'm wrong, but my impression is it doesn't sound like we'll need to scrap and rebuild everything from scratch, so ideally we can incrementally adopt these improvements.

  5. ciampo commented on Apr 24, 2026

    @ciampo
    ContributorAuthor

    What's the advantage of a subcomponent over a prop, particularly if the component is otherwise monolithic and its other aspects will be configured through props?

    More control and less flexibility in determining the contents of the page. I thought it would be fitting for the needs at this level of abstraction

    maybe this issue should serve more as a tracking issue, with discrete tasks broken out into their own sub-issues?

    Absolutely. Happy to do that once there is consensus around the plan

    Correct me if I'm wrong, but my impression is it doesn't sound like we'll need to scrap and rebuild everything from scratch, so ideally we can incrementally adopt these improvements.

    Some aspects are more incremental than others. I haven't focused too much on that aspect for now; my priority so far was to create the right abstraction, regardless of how incremental/disruptive it would be

  6. simison commented on Apr 29, 2026

    @simison
    Member

    As I've seen this component used around plugins and Gutenberg, a few things have come up:

    More opinionated canvas behaviour for common content types.

    • Full bleed (often DataViews tables),
    • full width with padding (e.g. widget dashboards), or
    • narrow centred view (e.g. DataForm settings pages).

    Currently, plugins and Gutenberg itself implement settings pages in various ways. Examples: AI settings, Gutenberg experiments, Gutenberg connectors and as a 3rd party plugin example Jetpack Newsletter settings. Since these pages are often built with similar components (DataForms, UI Cards, etc), it would make sense to have something that helps them stay more consistent at least within WordPress/Gutenberg itself.

    Image

    Support Tabs

    Currently, consumers can build tabbed content with the UI Tabs component, set the content to full-bleed, and then reset the content padding to whatever they actually need. Gutenberg's Fonts page is a good example

    Image

    Adding Tabs with border-bottom also creates the "double border" boxy layout situation; if the Page understands Tabs natively, it can decide where the bottom-border of the header should be shown, and how each page of the tabs should be rendered (settings, full bleed, with padding).

    Support footers

    Currently, Page lacks a way to add a footer, and the core footer is missing on many core pages (Connectors, Experiments, Fonts, etc).

    Image

    I'm not sure at what level of abstraction the core WP footer should get injected, but Page itself should offer a mechanism to show it. There are pages where the footer cannot visually work, such as full-width/height DataViews tables or editor pages. I'm not sure whether we can detect that situation automatically or if it would need to be controlled by the consumer via a prop.

    The Fonts page is an interesting example since it ships with its own fixed footer and styles for it, but the "Save" could get presented in some other way, too:

    Image

    Consumers should be allowed to replace (or append) their own product footer, but Page would handle its accessibility & semantics (<footer>), as well as fixed positioning in the page. Positioning on the consumer end is tedious and bug-prone if the styles of the page change. As an 3rd party example, Jetpack plugin footer:

    Image

    Support for Hello Dolly out of the box

    Since the Hello Dolly plugin ships with WordPress, it would be a shame if the Boot package and Admin UI Page component didn't support it out of the box.

    Currently, if one wants to make it work, each page/plugin needs to bring its own customisations to show Hello Dolly in the header using Page. Any compatibility code could probably ship within the Hello Dolly plugin itself, but the point is that it would just work well and look good with the rest of the Header components.

    Image
  7. ciampo commented on Apr 30, 2026

    @ciampo
    ContributorAuthor

    Thank you @simison , I'll digest the feedback later when I find some time to iterate on this again

  8. ciampo commented on May 8, 2026

    @ciampo
    ContributorAuthor

    Adding a link to #78001 to make sure we think our semantics better in the new version

  9. aduth commented on May 11, 2026

    @aduth
    Member

    Support Tabs

    Currently, consumers can build tabbed content with the UI Tabs component, set the content to full-bleed, and then reset the content padding to whatever they actually need. Gutenberg's Fonts page is a good example

    Between this and @ciampo's feedback in a project using @wordpress/admin-ui, I think we should consider how we want consumers to handle navigation. Navigation is mentioned as out of scope for this initial "2.0" architecture, and maybe it's fine to separate those concerns. In which case I expect we'll want a separate issue for this (and likely the underlying NavigationMenu component mentioned by @ciampo in his feedback). And in the meantime we can expect people to invent their own solutions, including using Tabs in ways that we'd want to discourage.

  10. simison commented on May 21, 2026

    @simison
    Member

    Adding that we should solve notice placements in classic WP Admin pages:

    Image
  11. simison commented on May 22, 2026

    @simison
    Member

    Recent work on experimental dashboard has an interesting example regarding header actions; it might make sense to allow both declarative header actions (which fold automatically under three dots) and consumers to build actions in a way that moves the mobile/desktop responsibility to them. This allows more flexibility (which is both good and troublesome), which I feel like the dashboard example justifies:

    Screen.Recording.2026-05-22.at.11.46.36.mov
  12. jasmussen commented on May 22, 2026

    @jasmussen
    Contributor

    I visually like that behavior very much, though want to flag that the behavior seems worth systematising so that it can become reusable (e.g. visual revisions has something similar when you enter and exit that modality), and properly accessible across all instances. In saying that I both agree there's something to what you propose, but saying also it should not be a one-off interface built only for the dashboard. (Which, by the way, looks fantastic!)

  13. ciampo commented on May 25, 2026

    @ciampo
    ContributorAuthor

    Agreed on systematising the behaviour. Specifically for Admin UI, I feel like this is a place where we may want to be quite prescriptive in what's possible from the consumer's PoV, otherwise we risk creating a weak abstraction. It also gives us a chance to impelement these patterns in an accessible way (which is not always trivial, especially when showing/hiding/replacing parts of the UI)

  14. simison commented on May 26, 2026

    @simison
    Member

    Yep; makes total sense to aim for it being declarative UI. The rigid vs flexible is something to explore with a few different use cases other than just a couple of CTAs in the header.

    My biggest takeaway from the Dashboard wasn't even the mode -change in actions, the animation, or the little custom divider, but how custom the mobile version might sometimes need to be to produce good UX:

    Screen.Recording.2026-05-26.at.19.19.45.mov
  15. ciampo commented on May 26, 2026

    @ciampo
    ContributorAuthor

    Out of curiosity, could "Customize" become another dropdown menu? It would allow us to reuse standard componentry, and work well across different viewport sizes

  16. joedolson commented on Jun 2, 2026

    @joedolson
    Contributor

    Exactly one

    per render.

    👍

    I think it should also check for no more than one header not inside sectioning content and no more than one footer not inside sectioning content, as these landmarks should only appear once.

    It would also be good to ensure that no content is output outside of these three elements.

    Exactly one h1 emitted by per render, carrying the accessible name from title. When breadcrumbs is non-empty, the h1 is visually hidden (via ) but remains in the DOM with the same accessible name. Consumer-authored h1s inside content are a consumer concern and are flagged by axe, not by .

    I agree with ensuring the contract protects the single h1 model, but enforcing a hidden h1 if there are visible breadcrumbs isn't something I'm totally on board with. I read the issue in the spec about it, and I can see the logic. Given that it appears that breadcrumbs are designed to be of equivalent size to the h1, I think it's probably OK; the main thing I don't like about it is that it means the visual name of the page changes position depending on whether there are breadcrumbs, and I think that can be confusing/offputting.

    aria-current="page" on the last breadcrumb item, regardless of how it is rendered (per WAI-ARIA APG).

    👍

    The visual slot is always wrapped in aria-hidden="true" and rendered outside the heading.

    Are there any cases where somebody could inject meaningful content or controls into the visual slot? It seems potentially problematic to me to force a region to be aria-hidden unless there's meaningful protection against it containing content or controls. (Noting that Axe should catch controls or content in side a container with aria-hidden: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus). As I read above, you explicitly say that the consumer can pass anything into the slot; that would mean that a consumer could pass a button in, and if they didn't test properly for accessibility, they'd believe it was fine, but have created a significant accessibility error.

    Actions group has a fixed, translated accessible label ("Actions").

    👍

    All interactive header elements have visible and programmatic names (enforced by axe in tests).

    Should also verify that the accessible name contains the visible name.

    Color contrast tested against the current @wordpress/theme palette in light and dark.

    👍

    Tab order follows DOM order: breadcrumbs → leading → header actions → content. (Per the §6 baseline HTML,

    is a sibling above the title row, and leading sits inside the title row before the visual/title cluster.) The

    is non-interactive and is skipped, as expected.

    The only risk here would be of custom CSS that used the order attribute to move items visually while retaining their DOM order. But that seems like a low risk in core development, and rare for extenders.

    Reduced-motion honored for any internal transitions (currently none; keep it that way).

    👍

    Heading order inside content is monotonic (no skipped levels). Validated by axe in the integration tests against a representative content fixture; consumer-authored content is otherwise their responsibility.

    Agreed that consumer content is out of our hands.

    Overall, I think that the accessibility contract is a good starting point for the admin UI framework. As I understand it, this does not cover the admin nav or admin bar, as those are external components, so I didn't address anything related to that.

  17. simison commented on Jun 4, 2026

    @simison
    Member

    [...] we might be better off with a "required title + optional hideTitleFromVision

    via

  18. ciampo commented on Jun 4, 2026

    @ciampo
    ContributorAuthor

    I think it should also check for no more than one header not inside sectioning content and no more than one footer not inside sectioning content, as these landmarks should only appear once.

    It would also be good to ensure that no content is output outside of these three elements.

    Those checks are hard to perform on consumer content, not sure we can do much there.

    the main thing I don't like about it is that it means the visual name of the page changes position depending on whether there are breadcrumbs, and I think that can be confusing/offputting.

    Gotcha. I'll look into ways to improve the predictability of where the h1 is rendered in the DOM, regardless of the breadcrumbs variant.

    Are there any cases where somebody could inject meaningful content or controls into the visual slot?

    As far as we document it well enough (ie, the contents associated with that prop are only meant to represent a visual decoration, ie. information that should not be otherwise exposed to assistive technology), I don't see that as being problematic.

    Consumers passing meaningful / interactive content would be breaking the contract that the APIs set.

    The only risk here would be of custom CSS that used the order attribute to move items visually while retaining their DOM order. But that seems like a low risk in core development, and rare for extenders.

    Similarly to the point above, consumers doing that would be expliclity misugin / breaking the APIs, and I don't think we need to cover that edge case. Moreover, consumers could apply custom styles to any part of any UI and change the order, so that's not really something specific to this part of Admin UI.

  19. aduth commented on Nov 18, 2026

    @aduth
    Member

    Cross-referencing some points I made at #86701 (comment) that could be relevant for Page's designed purpose. Notably, I propose there that we may want to remove some semantics of what Page handles today and have it focus more on UI consistency. Those semantics being DOM role (proposing removing role vs. the original issue here proposing <main>) and removing title behaviors, instead expecting those to be handled by routing mechanics in @wordpress/boot.

    The role point is also relevant insofar that: (1) WordPress itself already assigns role=main on one of the page wrapping elements and there should only be one main, and (2) there's some guidance around where main should live in a document (see Axe landmark-main-is-top-level and HTML spec for <main> "ancestor elements are limited to html, body, div, form without an accessible name"). There may be a separate discussion to be had about whether WordPress's current main assignment is the correct one relative to the actual primary content of the page, but that's not incompatible with shifting the semantics to exist at the "stage" aspect of the route.

  20. ciampo commented on Nov 25, 2026

    @ciampo
    ContributorAuthor

    Thanks for cross-posting, @aduth. I took this occasion as a change to read the plan again and assess it against latest trunk, and I think you're right on most of this.

    (1) WordPress itself already assigns role=main on one of the page wrapping elements and there should only be one main

    Agreed, I'll drop <main> from the plan. In wp-admin, boot mounts inside #wpbody-content, so a <main> in Page would be a second main nested inside Core's. The v1 site editor sits under the same wrapper. Page also isn't always the primary content. 12 of the 22 call sites on trunk pass headingLevel={ 2 }, because the site editor's h1 is in the sidebar. So "exactly one <main>" and "always an h1" can't be Page invariants.

    As far as I can tell, the full-page boot template has no main landmark at all. I think that's a gap in the template, and a separate issue.

    [...] shifting the semantics to exist at the "stage" aspect of the route.

    This also makes sense, at least from a high level. useRouteFocus already looks for .stage [role="region"], which only finds something when the route happens to render Page. Three things need sorting out before Page can drop its region:

    • Route title is optional, so the stage wouldn't always have a name.
    • The stage remounts on each navigation since Routing: Add static and lazy routes support to the boot package #72937, as you noted.
    • Page is also used outside boot. There are five call sites in edit-site, plus plugins that render it on classic wp-admin screens. Those need to get the region from their own host first.

    [...] removing title behaviors, instead expecting those to be handled by routing mechanics in @wordpress/boot.

    This is the one where I'm less sure. The visible heading is part of the header layout, and Page has to work without boot. I do agree that four sources for "the page's title" is too many. What about two?

    • The route title names the document, the spoken announcement, and the stage region.
    • Page renders the visible heading from title or from the last breadcrumb, never both, and ariaLabel goes away.

    #86982 already gets most of the way there.

    What I'd change in the plan

    The description is partly stale by now, so I'll rewrite it as a tracking issue with sub-issues, as you suggested back in April. The main changes:

    • Landmarks belong to the host. Page guarantees one heading and a consistent header, and nothing about main. I'll also add Joe's check that the accessible name contains the visible name.
    • title or breadcrumbs, enforced by the types. That guarantees a name without ariaLabel. It also replaces the "visually hidden h1 when breadcrumbs show" rule, which Joe wasn't fully on board with. headingLevel stays for now.
    • New gating question: how does a host give Page its defaults? admin-ui is bundled into each route, so React context can't carry the router link or the sidebar toggle from boot. The toggle only works today because slot/fill comes from @wordpress/components, which is shared. The same problem is holding up Admin UI: Update Page breadcrumbs to receive configuration array #86982 and Admin UI: Configure router Link to match exact to fix duplicate aria-current in breadcrumbs #87050. The plan's answer was an AppPage wrapper exported from boot. That works, but it ties Page's props to the WordPress version, and every route would have to change its import. I'd rather find a small shared channel, and I'd like opinions on this one.
    • actions, padding, and footer come last. All 12 call sites that set actions pass JSX today, including custom components such as AddNewTemplate and WidgetDashboard.Actions. A { primary, secondary, overflow } shape made of { label, onClick } items can't express those. Padding and footer are still waiting on design in Admin UI: opinionated canvas behaviour for common content types #78881 and Admin UI: support footers #78902.
    • Already shipped, so I'll take these out. CSS modules and tokens, the @wordpress/ui Breadcrumb (as compound parts, not the data shape the plan described), and the navigation prop with components.link, which makes the proposed linkComponent prop redundant. The "2.0" label goes too, since the package is at 3.2.0.

    NavigableRegion still needs a new home, but it's no longer the top blocker.

    What do y'all think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design SystemNeeds Decision[Package] Admin UI[Package] UI[Type] Enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions