Skip to content

ui-kit: Toggle inline transitions override reduced-motion styling #2166

Closed as duplicate

Description

@schlessera

Context

The real Chromium Storage walkthrough exposed an existing Toggle reduced-motion mismatch. Toggle (packages/ui-kit/src/primitives/Toggle.tsx:64) sets inline transition: background .18s ease on its track and transition: left .18s ease on its knob. The reduced-motion rule at packages/ui-kit/src/tokens.css:1461 declares transition: none, but normal stylesheet declarations do not override those inline declarations.

Pinned offline Chromium with reducedMotion: "reduce" returned matchMedia("(prefers-reduced-motion: reduce)").matches === true and a computed track transition duration of 0.18s. The attempted assertion expected 0s and failed on that value, not during module loading. Found while verifying #2059; its new history/table is static and this existing Toggle issue is independent of Storage policy.

Out of scope

No Storage sampling/forecast/notification changes, new motion policy or redesign of the switch.

Scope

Make the existing Toggle track and knob obey the established reduced-motion rule without changing ordinary-mode behavior or hit targets. Audit other instances of this inline-transition override in the touched primitive.

Acceptance criteria

  • Under reduced motion, both track and knob have no running transition when toggled.
  • Ordinary motion preserves the intended track/knob transition.
  • Keyboard operation, accessible name/checked state and 44px hit area remain intact.

Verification

Use the existing pinned offline browser harness. Assert real computed styles and state changes in both motion modes. Mutate the reduced-motion fix, observe the named assertion fail, restore, and run focused preflight plus selected hosted proof.

Contract impact

Existing behavior repair; no public API changes. Include a ui-kit patch changeset.

Activity

  1. added
    type: fix
    area: ui-kit
    priority: p2
    agent-ready
    on Oct 16, 2026
  2. added this to the 0.44.0 milestone on Oct 24, 2026
  3. schlessera commented on Oct 24, 2026

    @schlessera
    OwnerAuthor

    Closing as a duplicate of #2585, which now owns this fix. #2585's Toggle migration moves the track and knob transitions into the stylesheet, and its body now carries this issue's reduced-motion criteria, the pinned-Chromium failure evidence (0.18s computed under reducedMotion: "reduce") and the reduced-motion mutation as owned scope. One issue owns the Toggle transitions, so two agents will not change the same rendering independently. Milestone 0.44.0 is resolution context only, not a claim that anything was implemented here.

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

    agent-readyarea: ui-kitpriority: p2type: fix

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions