Add accessibilityHint and accessibilityLabel support to ButtonGroup buttons
#3,196 创建于 2021年9月4日
描述
Is your feature request related to a problem? Please Describe.
Add accessibilityHint and accessibilityLabel support to ButtonGroup buttons. Currently when I try to pass in a custom button component like this to the ButtonGroup buttons prop:
const buttons = [
(
<Text
accessibilityHint={translate('ARIA HINT - Tap to search by podcast title')}
accessibilityLabel={translate('Search by podcast title')}>
{translate('Podcast')}
</Text>
),
(
<Text
accessibilityHint={translate('ARIA HINT - Tap to search by podcast host')}
accessibilityLabel={translate('Search by podcast title')}>
{translate('Host')}
</Text>
)
]
Neither the accessibilityHint or accessibilityLabel are read. I think it may be because the ButtonGroup buttons are wrapped in their own that we cannot override or configure with props.
Describe the solution you'd like
When accessibilityHint and accessibilityLabel are provided for custom ButtonGroup buttons, they should be read by iOS and Android screen readers. This solution may require optionally overriding the wrapping the ButtonGroup buttons.
Describe alternatives you've considered
I can't think of another way to accomplish the same thing.