question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add accessibilityHint and accessibilityLabel support to ButtonGroup buttons

See original GitHub issue

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 <Touchable> 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 <Touchable> wrapping the ButtonGroup buttons.

Describe alternatives you’ve considered

I can’t think of another way to accomplish the same thing.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

3reactions
yndue736commented, Oct 22, 2022

This is very amazing you can check here some information about chilli comms where you can get the right information about the issues of my problem.

2reactions
yndue736commented, Jun 9, 2022

This is very impressive and also a useful idea you ca check little big city 2 where you can apply this kind of ideas and it will be a suitable choice for tis project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

accessibilityHint | Apple Developer Documentation
An accessibility hint helps users understand what happens when they perform an action on the accessibility element when that result isn't obvious from...
Read more >
Titanium.UI.OptionBar
Buttons with Text and Images. Creates an option bar where each button shows an image to the left of its text. This is...
Read more >
How to add UIAccessibility feature to a UIButton Action?
most of the ui elements have a .accessibilityHint and .accessibilityLabel properties. just name them appropriately and you are good to go.
Read more >
Buttons - Material Design
Icon. toggle button group. MDC Web currently does not support toggle button groups. Icon. Icons can be ...
Read more >
How to Support Assistive Technologies (The Java™ Tutorials ...
For example, assistive technologies can automatically get the text information that is set by the following lines of code: JButton button = new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found