diff --git a/src/main/assets/changelog-alpha.txt b/src/main/assets/changelog-alpha.txt index 820d7f6f1..55219acf6 100644 --- a/src/main/assets/changelog-alpha.txt +++ b/src/main/assets/changelog-alpha.txt @@ -1,6 +1,7 @@ /Alpha 370 (2026-09-13) Accessibility announcements for collapsing/expanding comments, and voting (thanks to codeofdusk) Fix accessibility focus when moving between parent comments (thanks to codeofdusk) +Fix custom accessibility actions intermittently disappearing from comments (thanks to codeofdusk) Fixes for inline image preview size in landscape mode Improved memory usage for inline image previews Fix for notification prompt being shown twice when logging in diff --git a/src/main/assets/changelog.txt b/src/main/assets/changelog.txt index bf220c0e6..b448e8a49 100644 --- a/src/main/assets/changelog.txt +++ b/src/main/assets/changelog.txt @@ -1,6 +1,7 @@ 119/1.27 Accessibility announcements for collapsing/expanding comments, and voting (thanks to codeofdusk) Fix accessibility focus when moving between parent comments (thanks to codeofdusk) +Fix custom accessibility actions intermittently disappearing from comments (thanks to codeofdusk) Fixes for inline image preview size in landscape mode Improved memory usage for inline image previews Fix for notification prompt being shown twice when logging in diff --git a/src/main/java/org/quantumbadger/redreader/views/AccessibilityActionManager.kt b/src/main/java/org/quantumbadger/redreader/views/AccessibilityActionManager.kt index 3ad838e6c..9c9e18555 100644 --- a/src/main/java/org/quantumbadger/redreader/views/AccessibilityActionManager.kt +++ b/src/main/java/org/quantumbadger/redreader/views/AccessibilityActionManager.kt @@ -40,6 +40,15 @@ class AccessibilityActionManager( } fun removeAllActions() { + // The click/long-click hints are labelled standard actions, which + // aren't tracked in existingActions. Clear them first: + // ViewCompat.addAccessibilityAction reuses the id of any existing + // action whose label matches, so a stale hint label left in the list + // would capture a matching custom action onto the standard action's + // id, hiding it from screen readers' custom action lists. + setClickHint(null) + setLongClickHint(null) + existingActions.forEach { ViewCompat.removeAccessibilityAction(view, it) }