Giter Site home page Giter Site logo

[React Native Gallery -> Pressable]: Keyboard focus and narrator focus are not on sync when user navigate to 'Disabled Pressable' button from 'Press me' button. about react-native-gallery HOT 3 CLOSED

YajurG avatar YajurG commented on June 11, 2024
[React Native Gallery -> Pressable]: Keyboard focus and narrator focus are not on sync when user navigate to 'Disabled Pressable' button from 'Press me' button.

from react-native-gallery.

Comments (3)

chrisglein avatar chrisglein commented on June 11, 2024 1

However, if the expected behavior is to never be able to have keyboard focus on to a disabled pressable, then there are likely some changes we need to make to the pressable behavior, similar to the issue linked above.

That would be my expectation. A disabled Pressable should not be tabbed to.

Compare with WinUI. Launch their gallery, got the button page, and click the "Disable button" checkbox. Then try to tab around. That Button cannot be selected with tab navigation.

Note that there is a separate mechanism for inspecting disabled components, scan mode. With that you should be able to see the component. But not normal tab navigation.

So that's the issue here. Our disabled item is still tab navigatable.

from react-native-gallery.

Yajur-Grover avatar Yajur-Grover commented on June 11, 2024

I tried debugging this issue and it looks like narrator is not focusing on the prop because the disabled property is set. If I remove the disabled={true} prop from the pressable example, then narrator shifts focus onto the disabled pressable example. This may be an issue caused by microsoft/react-native-windows#12457, where the platform code isn't recognizing the disabled prop, and is therefore allowing keyboard focus on to the disabled prop.

Not sure what the exact expected behavior is for a disabled pressable. If it is expected that you can focus on to a disabled pressable, but cannot press it, then it looks like this is a narrator issue and potentially outside our scope. However, if the expected behavior is to never be able to have keyboard focus on to a disabled pressable, then there are likely some changes we need to make to the pressable behavior, similar to the issue linked above.

@chrisglein @chiaramooney adding you for additional perspective.

from react-native-gallery.

Yajur-Grover avatar Yajur-Grover commented on June 11, 2024

I tested a disabled Pressable on a simple Expo snack here, and it looks like on RN core, when disabled={true}, you can't focus on the pressable at all through keyboard tab input. Going to assume that's the expected behaviour, which means there's an issue with the pressable code not recognizing the disabled prop, similar to microsoft/react-native-windows#12457.

from react-native-gallery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.