Skip to content

[CTX-0693] feat(ui): a11y baseline announcements/settings/hot-path + SessionId decision - #1291

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0693/a11y
Sep 22, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0693/a11y

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: area:ui | Labels: feat,P1,area:ui | Milestone: v0.1.0 | RFC: accessibility-baseline-candidate.md; workspace-panel-invariants.md F-3 | Task: CTX-0693

Summary

A11y batch (CTX-0693): completes the candidate accessibility baseline in bitty-ui for #1183 (announcements, settings composition, hot path — semantics projection, terminal/chrome exposure, and the a11y tree already landed via CTX-0614/CTX-0666), plus the evidence-only SessionId decision record for #995 (still [BLOCKED: OQ-058], no new type).

Code changes

  • crates/bitty-ui/src/a11y.rs (+293): three new candidate sections, all headless/deterministic/bounded, no wall-clock, no render/platform/PTY/plugin coupling:
    • Announcements — AnnouncementKind (Focus/AsyncState), AnnouncementQueue bounded (MAX_PENDING_ANNOUNCEMENTS = 8, DropOldest so newest state wins), consecutive-duplicate coalescing, MAX_ANNOUNCEMENT_TEXT_LEN = 256 fail-closed; push exactly once per focus/async transition, never on render, no timer, no repeating cadence.
    • Settings composition — A11ySettings (core-owned reduced_motion + high_contrast, both default off, no plugin input by construction): resolve_motion collapses to MotionSpec::INSTANT (final committed state) mirroring the MotionConfig short-circuit; high_contrast_outlines selects the accepted compliant --safe outline pair.
    • Hot path — A11ySource + needs_a11y_refresh: None never rebuilds, any named source does; the signature takes no clock/timer handle (no periodic refresh expressible) and no plugin handle/callback (no plugin code per keystroke).
  • crates/bitty-ui/src/view.rs (+5): decision F-3 record — no distinct SessionId newtype; ViewId keying retained until the owner resolves OQ-058.
  • crates/bitty-ui/tests/a11y_baseline.rs (+154): 9 new pins (4 announcements, 3 settings, 1 hot path, 1 SessionId/ViewId-keying); file now 27 tests.

Per-issue verdicts

Verification

  • cargo fmt --all -- --check: clean
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --locked: clean
  • cargo check --workspace --all-targets --locked: clean
  • cargo test --workspace --all-targets --locked: 4955 passed, 0 failed (incl. the 9 new pins)
  • cargo +1.85 check -p bitty-ui --all-targets --locked + cargo +1.85 test -p bitty-ui --test a11y_baseline (MSRV 1.85, no let-chains): clean, 27 passed
  • No MAX_* collisions, UiNodeId untouched, no hardcoded host paths, English-only docs

Closes #1183
Relates #995

@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 22, 2026
@Xuepoo Xuepoo added feat Feature P1 Priority: high area:ui Area: UI / layout labels Sep 22, 2026
@Xuepoo
Xuepoo merged commit dc9726c into main Sep 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Area: UI / layout feat Feature P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX-42: Accessibility baseline — semantics projection, roles, tab order, announcements

1 participant