fabOnReact / react-native-notes

MIT License
0 stars 0 forks source link

ProgressBarAndroid Component does not announce "disabled" #3

Closed fabOnReact closed 2 years ago

fabOnReact commented 2 years ago

https://github.com/facebook/react-native/issues/30941 and https://github.com/react-native-progress-view/progress-bar-android/issues/62

Description

When using a screen reader the ProgressBarAndroid component does not announce that it is disabled. This issue is covered in-depth by parent issue https://github.com/facebook/react-native/issues/30840

fabOnReact commented 2 years ago

Other Accessibility Issues in ProgressBar

Related issue https://github.com/react-native-progress-view/progress-bar-android/issues/61#issuecomment-785188227

fabOnReact commented 2 years ago

Accessibility Issue on API 28

Commit https://github.com/fabriziobertoglio1987/progress-bar-android/commit/a6b7cc966277ae15a744b0b4df08f860a24eab1a adds the accessible prop from the ReactViewManager (video) for debugging purpose.

Relevant code for adding accessibilityState: https://github.com/fabriziobertoglio1987/react-native/blob/76a2cf3569571b943b4bcc6867e069338ff88f1f/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L180

Relevant code to announce the ProgressBarValue (10%, 20%, 30%) https://github.com/fabriziobertoglio1987/progress-bar-android/blob/2dc8ceb1148c065847191ca160985f7cf821c6f8/android/src/main/java/com/reactnativecommunity/androidprogressbar/ProgressBarContainerView.java#L91-L92

Breaking down the relation between ReactAccessibilityDelegate, BaseViewManager and how the accessibilityState triggers the announcement

https://docs.google.com/spreadsheets/d/1t0EWM03FjroCw6TYHeBi0kyjnw8KlY1YQwv52mO_dcQ/edit#gid=1137953085&range=E12

fabOnReact commented 2 years ago

https://github.com/fabriziobertoglio1987/progress-bar-android/blob/a6b7cc966277ae15a744b0b4df08f860a24eab1a/android/src/main/java/com/reactnativecommunity/androidprogressbar/ReactProgressBarViewManager.java#L105-L108

The method is never called

  @Override
  public void updateExtraData(ProgressBarContainerView root, Object extraData) {
    // do nothing
  }

and overrides

https://github.com/fabriziobertoglio1987/react-native-notes/blob/9cd43340a7e2443564c2ff5e8e85d37f6e1e47ef/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L331-L335

Seems not relevant for accessibility.

fabOnReact commented 2 years ago