Repository navigation
fix(agent): make Maple Work readable through accessibility - #1451
Merged
Merged
Conversation
GPUI only reports elements with an id and a role, and it builds the tree while prepainting. That left most of the app missing from it. Render cached views every frame while an accessibility client is connected. A cached view that reuses its frame pushes no nodes, so any repaint elsewhere removed the sidebar and its actions. Give RichText an id from its ordinal and a Label role, so messages, tool output and table cells can be read. Name pill buttons outside Settings through a text! child, and expose TextInput values, except masked ones. The quit prompt now empties its tree for a frame before closing. At the pinned gpui, closing a window an accessibility client has read aborts the process in accesskit_macos, and naming the buttons made that reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Screen readers and Cua read the same accessibility tree, and most of Maple Work was missing from it. A test with Cua found four gaps: message text was not there, sidebar rows came and went, typed input never showed up, and the quit prompt's buttons could not be found. This PR fixes all four and a crash the fix exposed.
There are two root causes:
.child("Save")is invisible and a button with only that child has no name.Changes
embed_cached_viewrenders the sidebar and folder dialog every frame while an accessibility client is connected, and stays cached otherwise.RichTexttakes an id from its ordinal and reports as a label, which covers messages, code blocks and table cells. Tool arguments and output, error rows, permission rows and system rows are exposed too.TextInputexposes its value. Masked fields andSecretInputdo not.gpui::text!child. This is a mechanical change, and most of the diff.Keep openaborted the app. At the pinned gpui the AccessKit adapter outlives a closed window, andaccesskit_macosthen panics across the FFI boundary. The prompt now draws one empty frame before closing, which covers the buttons and the red close button. Zed commit0eda7703f6fixes the cause, so this can go when the pin includes it. Other windows only close as Maple exits, or hide.CLAUDE.mdgains a short accessibility section.Verification
Cua 0.38 drove a debug build against the
agent-a11yLocal stack, with the Local Pro fixture and DeepSeek V4.1 Flash, all background delivery:Settletasks.stateissettledin the databaseKeep openQuit Mapleduring a runThe debug build panics on duplicate accessibility ids. None appeared with those replies open, and the app log has no panics after the fix.
just ci-lint,just ci-extra,just lane repo, andcargo test --workspace --no-fail-fastapart from the failure below.reads_native_release_tar_format_and_preserves_bundle_modes, the known bsdtar failure on this Mac in the untouchedmaple-agent-updatercrate.MAPLE_HOOK_SKIP=1because of that failure.Not covered
aria_position_in_setstill gives their position.Trade-offs
window not founderror from gpui. It looks harmless.🤖 Generated with Claude Code