Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

accessibilityActions is causing problems with accessible props (Android - accessibility) #29715

Closed
felire opened this issue Aug 20, 2020 · 9 comments
Assignees
Labels
Accessibility Team - Evaluated Accessibility Component: View Newer Patch Available Platform: Android Android applications. Resolution: Duplicate Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@felire
Copy link

felire commented Aug 20, 2020

Description

Hi! This is an easy problem to describe.

We have this piece of code:

<View
      style={style.rangeContainer}
      {...accessibilityProps}
      // @ts-ignore
      onAccessibilityAction={onRangeAccessibilityAction}
    >
      <Text style={style.rangeTitle}>{label}</Text>
      <Text style={style.selectedValue}>{value}</Text>
    </View>

Where the accessibilityProps are these:

accessibilityActions: [
        {
          name: AccessibleSliderActions.decrement,
        },
        {
          name: AccessibleSliderActions.increment,
        },
      ],
      accessibilityHint: sliderHint(label, step),
      accessibilityLabel: sliderLabel(label, sliderValue, maximum),
      accessibilityRole: 'adjustable',
      accessible: true,
      accessibleValue: { max: maximum, min: minimum, now: sliderValue },

Me and me team found that accessible and accessibilityActions can't coexist. I mean, if I want to use this like it's described above. When I click on the first Text or on the second the screen reader will read that text instead of selecting the entire View, which is wrong because the accessible prop is set to true

React Native version:

We are using 0.61.5

Steps To Reproduce

Those are explained above

Expected Results

The expected result is that both props can coexist and everything works as it should. Those Text shouldn't be accessibles based on Docs.

@github-actions
Copy link

⚠️ Using Old Version
ℹ️ It looks like you are using an older version of React Native. Please upgrade to the latest version, and verify if the issue persists. If it does not, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the current release.

@safaiyeh
Copy link
Contributor

Hi @felire thanks for the issue. Sorry you're having trouble, could you verify this occurs on the latest version?

@felire
Copy link
Author

felire commented Aug 27, 2020

@safaiyeh The bug is still happening on the latest version of RN.

Tested on 0.63.2

@vitorandrietta
Copy link

hi, this is also happening with in version 0.63.2
after passing accessibilityActions prop to the view I become able to select its children elements, even after setting
accessible={true} in the parent view

@stale
Copy link

stale bot commented Dec 25, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 25, 2020
@amarlette
Copy link

This issue should be resolved by #30851 once that issue is closed as part of the Improved React Native Accessibility Project

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 18, 2021
@fabOnReact
Copy link
Contributor

fabOnReact commented Nov 28, 2022

a solution, as done with Text onPress and onLongPress, is setting focusable={true} when prop accessibilityAction != null. I will test it and prepare a PR in the future.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 29, 2023
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Jul 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Accessibility Team - Evaluated Accessibility Component: View Newer Patch Available Platform: Android Android applications. Resolution: Duplicate Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

7 participants