Repository navigation
fix(linux): send integer accessibility states to GTK - #545
Merged
Merged
Conversation
houko
force-pushed
the
fix/linux-a11y-state-types
branch
2 times, most recently
from
November 18, 2026 01:15
1c9db13 to
8a10d8a
Compare
GTK collects the selected and expanded states, booleans that may be undefined, with g_value_get_int. Linux sent them as boolean GValues, so GTK logged a g_value_get_int critical and stored false for both: AT-SPI clients never heard a view as selected or expanded. Send them as integer GValues, as the invalid state already was. Fixes #524
The regression opens a window on a private D-Bus session with GTK_A11Y=atspi and reads the view's state set through libatspi from a separate process, so the client's synchronous calls cannot dispatch GTK callbacks on the test goroutine. It toggles both states true, false and true, expects the view to stay expandable when collapsed, and fails on any g_value_get_int critical. CI installs at-spi2-core for the accessibility bus.
houko
force-pushed
the
fix/linux-a11y-state-types
branch
from
November 18, 2026 01:23
8a10d8a to
263297c
Compare
Collaborator
Author
|
Reviewed. Rebased onto main d55b37b (no conflicts) and checked independently.
|
houko
marked this pull request as ready for review
November 18, 2026 01:24
Collaborator
Author
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
Fixes #524.
GTK 4 collects the selected and expanded accessibility states, booleans that may be undefined, with
g_value_get_int. Linux sent them as boolean GValues, so GTK logged ag_value_get_intcritical for each and stored false: AT-SPI clients never heard a view as selected or expanded. Linux now sends both as integer GValues, as it already did for the invalid state. The other boolean states (disabled, hidden, busy) are collected as plain booleans by GTK and keep their boolean GValue.The regression opens a window on a private D-Bus session with
GTK_A11Y=atspiand reads the view's AT-SPI state set through libatspi from a separate process, so the client's synchronous calls cannot dispatch GTK callbacks on the test goroutine. It toggles both states true, false and true, expects a collapsed view to stay expandable, and fails on anyg_value_get_intcritical. CI installsat-spi2-corefor the accessibility bus.Targets
Screenshots
None: accessibility metadata only.
Verification
TestAccessibilitySelectedAndExpandedReachATSPIfails 5 of 5 runs on main'saccess.go(expandable true, expanded false, selected false, withg_value_get_intcriticals) and passes 5 of 5 runs with the fix.g_value_get_intcriticals and fails the new test; with the fix there are none and 138 tests pass.TestCanvasSamplesfails identically on both because the binary runs outside the source tree without its image fixture.go build ./...,go vet ./internal/platform/linux,GOOS=windows go build ./...,GOOS=android GOARCH=arm64 go build ./...,GOOS=js GOARCH=wasm go build ./core: passed.go tool nsgo check -target all: passed.go tool nsgo test -run 'Layer|Skills|Doc' .: 35 passed.Checklist