-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Android: using AccessibilityNodeInfo#addAction to announce Expandable/Collapsible State #34353
Closed
Closed
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d1b97ec
draft solution with example
fabOnReact 1b2a898
adding examples from snack
fabOnReact d58a2db
adding action expand and collapse
fabOnReact 4e5773c
Merge branch 'main' into expanded-state
fabOnReact 01b0f6c
remove useless if statement
fabOnReact 9fe1630
remove example
fabOnReact 0839607
Merge branch 'main' into expanded-state
fabOnReact 14509d9
Merge branch 'main' into expanded-state
fabOnReact e5b6b07
Merge branch 'main' into expanded-state
fabOnReact 28e9c3b
remove default expand/collapse action, the state is managed with java…
fabOnReact 2e707f3
Merge branch 'main' into expanded-state
fabOnReact 2b18135
Merge branch 'main' into expanded-state
fabOnReact 7033471
Merge branch 'main' into expanded-state
fabOnReact f9b710d
invert ACTION_EXPAND and ACTION_EXPAND (codereview)
fabOnReact 8e7168f
commiting example
fabOnReact 6f4184f
adding return type to Component
fabOnReact 266f13b
improving example
fabOnReact ef30488
change Expand/Collapse with standard action
fabOnReact 1160c32
adding expand/collapse custom actions
fabOnReact 9a60946
removing expand/collapse actions
fabOnReact 125cb45
Merge branch 'main' into expanded-state
fabOnReact ba171fc
paper - expand/collapse using onAccessibilityAction
fabOnReact c6d19e9
minor change
fabOnReact b80bcb3
adding collapse/expand in performAccessibilityAction callback
fabOnReact 914c7a5
update example
fabOnReact File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm misreading this, but isn't this adding an action of "ACTION_EXPAND" when the state is "expanded"?
It should do the opposite, when a state is "expanded" the only available action should be "ACTION_COLLAPSE" and when a state is "collapsed" the only available action should be "ACTION_EXPAND".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blavalla Thanks a lot. I added the suggested changes. I also added these changes:
setTag
andgetTag
to retrieve and update theaccessibility_state_expanded
in ReactAccessibilityDelegatereact-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java
Lines 268 to 276 in b80bcb3
react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java
Lines 228 to 235 in b80bcb3
react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java
Lines 365 to 371 in b80bcb3