Skip to content

[core-split] Retire bitty-ui a11y model onto SnapshotHost seam #1996

Closed

Description

@Xuepoo

Priority: P2 | Area: architecture | Labels: chore,P2,area:architecture | Milestone: v0.1.0 | Audit: bitty#1629 F4 (CTX-1085 Slice C)

Summary

Retire Core's parallel accessibility model
(crates/bitty-ui/src/a11y.rs, 41.8 KB, 89 symbols) onto the published
bitty-a11y SnapshotHost seam (build_snapshot / focus_for /
announcements + Adapter::ingest_host), so a single model owns snapshot
semantics.

Current state (evidence)

  • crates/bitty-ui/src/a11y.rs: A11yRole, SceneKind, ChromeKind,
    InteractiveNode, A11yNode/A11yTree, terminal_text_runs,
    expose_terminal, FIDELITY_BOUNDARY, MAX_A11Y_TREE_NODES = 4096,
    MAX_ACCESSIBLE_NAME_LEN = 256 — every one duplicated 1:1 in
    bitty-a11y/src/snapshot.rs (value match; name mapping documented in
    that repo's docs/host-trait-and-core-followup.md).
  • Only consumer of Core's copy: uitree.rs (a11y_role_of).
  • bitty-a11y already ships the Adapter/ingest/expose_to side plus
    tests/host_conformance.rs (11 tests: bounds, fail-closed, stale
    rejection, no retained handles).

Target state

  • Core's a11y.rs retires onto the seam: Core implements SnapshotHost
    over its real UI state (transient &Snapshot/&HandleMap only, no
    retained handles), bounded inputs pinned (256/4096/256/8),
    A11yError-only mapping.
  • The extension stays the single owner of snapshot semantics, focus
    binding, and announcement policy.

Acceptance criteria

  • No parallel A11yRole/SceneKind/SnapshotBuilder-shaped model
    remains in Core.
  • uitree.rs consumer rewired; headed + headless a11y tests green.
  • Bounds + fail-closed + no-retained-handles covered by tests on the
    Core side of the seam.
  • Docs synced if exposed behavior changes.

Dependencies / blockers

  • bitty-a11y#15 (SnapshotHost trait) implemented; this issue is the
    Core-side retirement follow-up deferred from it (tracked from
    bitty#1629).

Scheduling

Post-0.0.23 work. Land inside the 0.0.24 window (milestone stays v0.1.0).
No implementation until a CarryCtx task is claimed; this issue is the
立案 record only.

Activity

  1. added this to the v0.1.0 milestone on Oct 12, 2026
  2. added
    chore
    P2
    on Oct 12, 2026
  3. Xuepoo commented on Oct 14, 2026

    @Xuepoo
    ContributorAuthor

    Delivered by PR #2038 (squash-merged 2026-10-13, [CTX-1176] chore(a11y): retire Core model onto SnapshotHost seam). Closing the stale premise.

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

    P2area:architecturechore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions