Open paperbackdragon opened 2 years ago
First thing to do here will be to replicate on other platforms and compare behavior.
Potentially related: https://github.com/facebook/react-native/pull/34287
related: https://github.com/microsoft/react-native-windows/issues/8875. Next step is to confirm that the root cause is the same for both, in which case this will be a matter of checking the disabled/enabled state when deciding on isTabStop value for that control.
Problem Description
If you make a View that's focusable and has an accessibility label, then set the accessibility state to have
disabled: true
, you can still tab to it (it's still focusable), but screen readers like Narrator don't read anything when it's focused.I think one of two things could fix this:
Steps To Reproduce
I was able to reproduce this in the "Accessible" sample app by adding this code and including in what gets rendered:
Notice you can tab to the "Test" component in the UI, but narrator won't read anything, unless you comment out the
accessibilityState
prop.Expected Results
See problem description - either the screen reader should announce this component, or you shouldn't be able to focus it at all.
CLI version
7.0.4
Environment
Target Platform Version
No response
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2019
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response