-
Notifications
You must be signed in to change notification settings - Fork 25k
Allow text links to be navigatable via keyboard by default v2 #49381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
d93de03 to
6b605d8
Compare
…ok#49381) Summary: A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Differential Revision: D69551206
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
…ok#49381) Summary: A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Differential Revision: D69551206
6b605d8 to
5414da3
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
…ok#49381) Summary: A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Differential Revision: D69551206
5414da3 to
7781177
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
…ok#49381) Summary: A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Reviewed By: NickGerleman Differential Revision: D69551206
7781177 to
732d591
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
… to subclass (facebook#49377) Summary: ReactAccessibilityDelegate exists to handle much of the accessibility tasks in the various Views in RN. There is quite a bit of text specific logic, mostly related to virtual views and nested links within a TextView. I decided to subclass this into a TextView-specific version because I need this delegate to reference TextView or ReactClickableSpan, which live under `react/views` while ReactAccessibilityDelegate live under `react/uimanager`. The former depends on the latter, so making the latter depend on the former would for a dependency cycle that would break builds. I thought about making a separate package for this but both `react/views` and `react/uimanager` need to include ReactAccessibilityDelegate so we would still have a cycle. mAccessibilityLinks is only set on ReactTextViewManager, so this is purely a text thing. Subclassing is not the most ideal as it extends the inheritance chain some more but I do not see a better option. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D69499115
…eak TalkBack Summary: Whenever we remove a link in some text we do not properly update the accessibility delegate to respond to this change. As a result we still think that there are nodes to access around the spans Changelog: [Android][Fixed] - Fix text link accessibility on state update removal Reviewed By: NickGerleman, mdvacca Differential Revision: D69551906
…ok#49381) Summary: A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D69551206
732d591 to
b847be8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D69551206 |
|
This pull request has been merged in a003be0. |
…ok#49381) Summary: Pull Request resolved: facebook#49381 A much improved version of my previous attempt in D68306316 (facebook#48773). Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D69551206 fbshipit-source-id: 6a88ccd507dc5534c1f494e3303c6bfc2bae5e9f
Summary:
A much improved version of my previous attempt in D68306316 (#48773).
Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses
ExploreByTouchHelper'sonVirtualViewKeyboardFocusChangedandonPerformActionForVirtualViewto handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links.Differential Revision: D69551206