Skip to content
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: Adding custom actions #30854

Closed
amarlette opened this issue Feb 3, 2021 · 3 comments
Closed

Android: Adding custom actions #30854

amarlette opened this issue Feb 3, 2021 · 3 comments
Labels
Accessibility Team - Evaluated Accessibility Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@amarlette
Copy link

amarlette commented Feb 3, 2021

Description

The accessibilityActions and onAccessibilityAction provided by React Native (https://reactnative.dev/docs/accessibility#accessibility-actions) do not work on all core components.

Specifically Button, TextInput, Text, and Picker do not allow these properties to be set, even though they do support other accessibility properties.

Custom actions are often added to help streamline the UI, and allowing them to be used in some places but not others limits their usefulness.

React Native version:

v0.63

Expected Behavior

AccessibilityActions and the onAccessibilityAction callback should be able to work on all core components.

Snack

Android Details

AccessibilityActions and onAccessibilityAction are already well implemented on the Android side, so this change likely only needs to happen in the components themselves on the Javascript side.

@blavalla blavalla added Accessibility Team - Evaluated Good first issue Interested in collaborating? Take a stab at fixing one of these issues. labels Feb 19, 2021
@dennisurtubia
Copy link
Contributor

Hi, @amarlette! Can I work on this issue? Thank you for now!

@amarlette
Copy link
Author

Thank you for taking this on @dennisurtubia! I'll move this into the "In-Progress" column

@amarlette amarlette linked a pull request May 17, 2021 that will close this issue
facebook-github-bot pushed a commit that referenced this issue May 26, 2021
Summary:
Android: Adding custom actions (#30854).
Adds accessiblity actions on core components (Button, TextInput, Text, and Picker).

## Changelog
[General] [Added] - Adds accessiblity actions on core components

Pull Request resolved: #31532

Test Plan:
- `npm test`
- Rendering of components on `RNTesterApp` using talkback:
    - Check if accessibility actions were available;
    ![image](https://user-images.githubusercontent.com/33161939/118381843-a668c180-b5c5-11eb-9ce4-016a49157dc5.png)
    - Trigger `activate` action for all components;
    ![image](https://user-images.githubusercontent.com/33161939/118381736-7bca3900-b5c4-11eb-82fb-32e824e1b38c.png)

## Notes
- For `TextInput` an unexpected error is raised:
![image](https://user-images.githubusercontent.com/33161939/118381603-d1054b00-b5c2-11eb-93f2-1d5730ee2d24.png)

Reviewed By: kacieb

Differential Revision: D28654294

Pulled By: lunaleaps

fbshipit-source-id: 80dd3f3c7aa27bbaf16ef12997e8f55952a02eb2
@amarlette
Copy link
Author

Closed by #31532

@facebook facebook locked as resolved and limited conversation to collaborators Jun 3, 2022
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility Team - Evaluated Accessibility Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants