facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.8k stars 24.29k forks source link

Android: Progress Bar values not announced #30845

Closed amarlette closed 2 years ago

amarlette commented 3 years ago

Description

In the component, when using a screen reader it does not announce current value on focus. Without this, the progress bars are not usable.

React Native version:

v0.63

Expected Behavior

The current value of the progress bar should be announced on focus.

While not standard Android system behavior, progress bars could be improved by adding an option to automatically announce their progress as it increments.

Snack

Android Details

Accessibility for Progress bars on Android rely heavily on the AccessibilityNodeInfo's RangeInfo class. This class defines a min, max, and current value, and should be attached to the AccessibilityNodeInfo for any progress bar component.

Currently, this all works if using the accessibilityValue prop, but the built in class does not do this automatically.

blavalla commented 3 years ago

@kacieb , @nadiia , @lunaleaps , this issue was with the component, which is not included in the docs on reactnative.dev, so my guess is it's either deprecated, or not an officially supported component. That being said, it is included in the repo, so we should probably fix it, or delete it since it doesn't really work.

lunaleaps commented 3 years ago

Yea it looks deprecated: https://reactnative.dev/docs/progressbarandroid. This is not worth looking into since we're recommending users to use a community package instead -- should we close the issue @amarlette?

Simek commented 3 years ago

@lunaleaps ProgressBarAndroid component is deprecated since 0.63 (https://github.com/facebook/react-native/commit/f295d7f60843a45bb09fc366e497f512c2bc0046) release.

You might want to report the issue in the extracted package from core (https://github.com/react-native-progress-view/progress-bar-android). It was a part of RNC, but lately the policy have changed and many packages have been moved to their own organizations.

This is also the reason why we lately switch from recommending single package to RN Directory links:

fabOnReact commented 2 years ago

@blavalla @cortinico should be closed in favor of https://github.com/react-native-progress-view/progress-bar-android/issues/61