Skip to content

Accessibility: word navigation and search in the UIA text provider#543

Merged
deblasis merged 2 commits into
windowsfrom
a11y-uia-attributes
Jun 19, 2026
Merged

Accessibility: word navigation and search in the UIA text provider#543
deblasis merged 2 commits into
windowsfrom
a11y-uia-attributes

Conversation

@deblasis

Copy link
Copy Markdown
Owner

Builds on the merged UIA text provider with the navigation half of the text
pattern, so screen readers can move and search word by word.

Adds a real Word text unit: a word is the run starting at a non-whitespace
character whose previous character is whitespace, and a word unit covers the
word plus its trailing whitespace up to the next word start. Whitespace includes
newlines, so words never cross a line. ExpandToEnclosingUnit and
MoveEndpointByUnit both handle the Word unit now, with the same clamping and
signed move count as the existing Character and Line units.

Adds FindText: search the current range for a string, forward or backward, case
sensitive or not, returning the matching range or null.

The word boundary logic and the search are pure types in Ghostty.Core with unit
tests. The range provider maps the Word unit through and delegates the search.
No native changes.

Color text attributes are intentionally not included. UIA would map a range to
per cell colors, but read_cells only covers the viewport while the document is
the full screen including scrollback, so scrollback text has no cell data and
the viewport offset mapping is unreliable. macOS exposes no colors either. Left
as an optional follow up.

Verified locally:

  • dotnet build and dotnet test pass on x64 (the new pure logic adds 32 tests).
  • Launched the app with a command that prints a known multi word line, and
    through the automation tree confirmed ExpandToEnclosingUnit(Word) returns a
    single word and FindText finds a known word.

Left for manual testing: a real pass with NVDA and JAWS.

deblasis added 2 commits June 19, 2026 09:39
Screen readers can now move by word and search the terminal. Adds a real
Word text unit (word plus trailing whitespace, bounded by the next word
start) and FindText over the current range, both as pure logic in
Ghostty.Core with unit tests. The range provider maps the Word unit through
and delegates the search. No native changes.
@deblasis deblasis marked this pull request as ready for review June 19, 2026 07:43
@deblasis deblasis merged commit a2e7575 into windows Jun 19, 2026
99 checks passed
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