Skip to content

fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons#4030

Open
ashimraja wants to merge 1 commit into
react-native-elements:nextfrom
ashimraja:fix/button-group-accessibility
Open

fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons#4030
ashimraja wants to merge 1 commit into
react-native-elements:nextfrom
ashimraja:fix/button-group-accessibility

Conversation

@ashimraja

@ashimraja ashimraja commented Apr 14, 2026

Copy link
Copy Markdown

Fix: Accessibility support for ButtonGroup

Problem
Custom buttons passed to ButtonGroup do not propagate accessibilityLabel and accessibilityHint, so screen readers (TalkBack/VoiceOver) do not announce them.

Solution
• Extracted accessibility props from React elements
• Passed them to the underlying Pressable component

Testing
• Tested on Android emulator with TalkBack
• Verified correct announcement of label and hint

Example:

const buttons = [
  <Text accessibilityLabel="Podcast" accessibilityHint="Tap podcast">
    Podcast
  </Text>,
];

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • No new warnings introduced
  • Tested in example app
  • Accessibility verified using TalkBack

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Documentation update required

Testing

  • Tested on Android emulator with TalkBack
  • Verified correct announcement of label and hint
  • Unit tests added (not required for this change)

@ashimraja ashimraja changed the title fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons (closes #3196) Apr 14, 2026
@ashimraja ashimraja changed the title fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons (closes #3196) fix(button-group): support accessibilityLabel and accessibilityHint for custom buttons Apr 14, 2026
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