Skip to content

macOS: Basic Read-Only Accessibility Integration #7601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 15, 2025
Merged

macOS: Basic Read-Only Accessibility Integration #7601

merged 8 commits into from
Jun 15, 2025

Conversation

mitchellh
Copy link
Contributor

This integrates with macOS accessibility APIs to expose Ghostty terminal structure and content.

This is a very, very bare implementation and the terminal contents currently reported are the full screen and scrollback which is way too much for realistic human accessibility use. The target use case for this PR is to enable automated tooling (namely, AI screen readers). However, this is all groundwork we'll need to iterate and improve the accessibility work anyways.

To make this work, I also replatformed some of our hacky C APIs onto a more robust ghostty_surface_read_text API that can now read arbitrary ranges of the screen into C strings for consumers to use. This will be useful in more places going forward (hint hint).

Before

Accessibility tooling can't read anything, Ghostty has no attributes, no contents, just shows up as a square.

CleanShot 2025-06-15 at 14 06 55@2x

After

A lot of metadata, including the screen contents as text.

CleanShot 2025-06-15 at 14 07 25@2x

Also, split hierarchies are navigable:

CleanShot.2025-06-15.at.14.09.51.mp4

@steipete
Copy link

Love to see this being picked up, thanks!

@mitchellh mitchellh merged commit d0f116d into main Jun 15, 2025
76 checks passed
@mitchellh mitchellh deleted the macos-ax branch June 15, 2025 22:10
@github-actions github-actions bot added this to the 1.2.0 milestone Jun 15, 2025
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.

2 participants