Skip to content

Improve accessibility of list items for Talkback screen reader#2141

Open
keymapper-ai wants to merge 1 commit into
developfrom
claude/issue-1369-talkback-accessibility
Open

Improve accessibility of list items for Talkback screen reader#2141
keymapper-ai wants to merge 1 commit into
developfrom
claude/issue-1369-talkback-accessibility

Conversation

@keymapper-ai
Copy link
Copy Markdown
Collaborator

Closes #1369

Summary

  • Drag handle content descriptions: The drag handle icons in trigger key list items and action list items previously had contentDescription = null. They now use the existing drag_handle_for string resource (e.g. "Drag handle for Volume Up") so TalkBack announces them meaningfully.
  • Custom accessibility actions for reordering: Added onMoveUp and onMoveDown parameters to TriggerKeyListItem and ActionListItem. When reordering is enabled, "Move up" and "Move down" custom accessibility actions are registered via Modifier.semantics { customActions = ... } so TalkBack users can reorder items without performing drag gestures. The first item only shows "Move down" and the last item only shows "Move up".
  • New string resources: accessibility_action_move_up ("Move up") and accessibility_action_move_down ("Move down") added to strings.xml.

Files changed

  • base/src/main/res/values/strings.xml — new string resources
  • base/src/main/java/.../trigger/TriggerKeyListItem.kt — drag handle label + move up/down accessibility actions
  • base/src/main/java/.../actions/ActionListItem.kt — drag handle label + move up/down accessibility actions
  • base/src/main/java/.../trigger/BaseTriggerScreen.kt — passes move callbacks to TriggerKeyListItem
  • base/src/main/java/.../actions/ActionsScreen.kt — passes move callbacks to ActionListItem
  • CHANGELOG.md — updated

Known limitations / areas for human review

  • The SortBottomSheetContent.kt drag handle already used drag_handle_for correctly and was not changed.
  • Strings are only provided in English; translations will need to be added for other locales.
  • The move actions operate by swapping adjacent items (index ↔ index±1). This matches the existing drag-and-drop behavior, but reviewers should confirm the onMove semantics are consistent with how the ViewModel handles reordering.

Generated by Claude Code

Add contentDescriptions to drag handle icons using the existing
drag_handle_for string resource, and add custom accessibility actions
("Move up", "Move down") to trigger key and action list items so TalkBack
users can reorder items without needing to perform drag gestures.
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.

Improve accessibility of list items for Talkback screen reader

2 participants