Skip to content

feat(flterm): expose accessible terminal semantics - #102

Open
adonm wants to merge 1 commit into
elias8:mainfrom
adonm:upstream/101-accessibility
Open

feat(flterm): expose accessible terminal semantics#102
adonm wants to merge 1 commit into
elias8:mainfrom
adonm:upstream/101-accessibility

Conversation

@adonm

@adonm adonm commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Adds a screen-reader semantics node to TerminalView:

  • semanticsLabel / semanticsHint params with sensible defaults ('Terminal' / 'Activate to focus terminal input'). Set semanticsLabel: null to delegate the accessible surface to an embedding application.
  • The semantics node exposes the visible, non-concealed terminal viewport as plain text (wide cells widened, SGR 8 invisible cells omitted, wrapped rows joined), captured from the render pipeline after each paint and coalesced through a bounded 100 ms refresh interval — so output updates never announce as a live region.
  • The snapshot follows the visible scrollback viewport (primary screen only), and switching controllers clears the cached value.
  • Focus/tap actions route to terminal input focus.

July 2026 update: reworked onto current main

This branch has been rebased onto main after the controller/view boundary refactors (#143, #144) and reworked for the current frame-source pipeline:

  • FrameBuilder.semanticsText() walks the current RowIterator/CellIterator state; RenderPipeline forwards it.
  • TerminalRenderer/render box capture the snapshot after frame sync when a semanticsGeneration advances.
  • TerminalView owns the generation bumps (terminal output, primary-screen scroll, controller swap) and the ValueNotifier-driven semantics node.

Verification

  • Full flterm suite with source-compiled native assets (Zig 0.16): 983 passed, including the new frame-builder semantics test and four view tests (non-concealed text, label delegation, scrollback viewport tracking, controller swap clearing).
  • dart format --set-exit-if-changed packages/flterm and dart analyze packages/flterm: clean (only 2 pre-existing info lints under tool/benchmarks).

Carried downstream in the Zuko remote-shell client since flterm 0.0.4; this is the port onto the refactored pipeline.

@adonm
adonm force-pushed the upstream/101-accessibility branch from ed9a137 to 2b8ca42 Compare August 15, 2026 22:36
@adonm adonm changed the title feat(flterm): expose terminal accessibility semantics feat(flterm): expose accessible terminal semantics Aug 15, 2026
@adonm
adonm force-pushed the upstream/101-accessibility branch from 2b8ca42 to ef585ed Compare August 15, 2026 22:49
@adonm

adonm commented Aug 15, 2026

Copy link
Copy Markdown
Author

Local validation on the pinned Flutter beta: flutter analyze clean, and the full rendering/view/controller test suites pass — 540 tests, including the four new semantics tests (visible non-concealed text, label delegation, scrollback viewport tracking, controller swap clearing).

Port the accessibility semantics node onto the controller/view input
pipeline. TerminalView gains semanticsLabel/semanticsHint params with
sensible defaults; setting semanticsLabel to null delegates the
accessible surface to an embedding application.

The semantics node exposes the visible, non-concealed terminal viewport
as plain text (wide cells widened, SGR 8 invisible cells omitted,
wrapped rows joined), captured from the render pipeline after each paint
and coalesced through a bounded 100 ms refresh interval so output
updates never announce as a live region.

The snapshot follows the visible scrollback viewport (primary screen
only), and switching controllers clears the cached value. Focus/tap
actions route to terminal input focus.

This was carried downstream in the Zuko remote-shell client and is
ported here onto the refactored frame-source pipeline.
@adonm
adonm force-pushed the upstream/101-accessibility branch from ef585ed to c6e2bf7 Compare August 26, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant