Skip to content

Fix custom accessibility actions vanishing after rebind - #1376

Merged
QuantumBadger merged 2 commits into
QuantumBadger:masterfrom
codeofdusk:fix-a11y-hint-collision
Sep 13, 2026
Merged

QuantumBadger merged 2 commits into
QuantumBadger:masterfrom
codeofdusk:fix-a11y-hint-collision

Conversation

@codeofdusk

Copy link
Copy Markdown
Contributor

Custom accessibility actions whose label matches the configured click/long-click hint (such as collapse with the default click action) intermittently disappear from the accessibility actions list. Androidx's ViewCompat.addAccessibilityAction reuses the id of any existing action that has a matching label, and the click/long-click hints (#1047) are labelled standard actions that removeAllActions never cleared. So on every other rebind the custom action gets attached to ACTION_CLICK's id and is then destroyed when the hint is re-set. This PR clears the hints in removeAllActions before deleting tracked actions; callers reset them when re-registering. Tested on a Pixel 6A (Bluejay); actions and hints consistently appear as expected.

@codeofdusk

Copy link
Copy Markdown
Contributor Author

CC @QuantumBadger.

@QuantumBadger
QuantumBadger force-pushed the fix-a11y-hint-collision branch from 8e4e34d to 54527c3 Compare September 13, 2026 14:39
@QuantumBadger
QuantumBadger merged commit 065f1e2 into QuantumBadger:master Sep 13, 2026
1 check passed
@QuantumBadger

Copy link
Copy Markdown
Owner

Merged, thank you!

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