-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Add accessibilityElementsHidden prop #17627
Conversation
@@ -173,6 +174,16 @@ module.exports = { | |||
* See http://facebook.github.io/react-native/docs/view.html#accessibilityviewismodal | |||
*/ | |||
accessibilityViewIsModal: PropTypes.bool, |
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.
no-trailing-spaces: Trailing spaces not allowed.
I'm not super familiar with Android, but it doesn't appear that my changes caused the test failure? |
Well, this is really great. @aputinski What do you think? |
Looks like that was closed and we're now discussing #11788. I don't have a strong preference, but it seems like there is quite a bit of confusion about trying to unify this behavior. Would it be possible to merge this (since it's non-breaking) and then continue discussing unifying this property down the road? |
.gitignore
Outdated
@@ -48,6 +48,7 @@ node_modules | |||
*.log | |||
.nvm | |||
/danger/node_modules/ | |||
scripts/.packager.env |
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.
Why do we need this?
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.
When I was running the build locally, that file was generated and I didn't want to commit any build artifacts. It's unrelated to my change and I can remove it if necessary.
@aputinski Yeah, that's reasonable. Even if I am going to land that PR as well, it's "safer" to land yours first. |
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.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I think landing this is a mistake without understanding the android part. The reason I abandoned my initial PR was because no one from facebook actually showed interested and were willing to consider a practical solution. I am still interested to see this feature landed so I don't have to maintain a fork that has some decent a18y. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
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.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Allow iOS to have similar accessibility functionality to Android. This PR exposes the `accessibilityElementsHidden` property on iOS which is similar to Android's `importantForAccessibility="no-hide-descendants"` I didn't see any existing examples for testing native props being passed through, but I did add an example to the RNTester app. I've attached some screenshots using the Accessibility Inspector to verify the property was correctly passed through.   I've updated the website with appropriate documentation. facebook/react-native-website#141   [IOS] [FEATURE] [View] - Added accessibilityElementsHidden property Closes facebook#17627 Differential Revision: D6806444 Pulled By: hramos fbshipit-source-id: 50d31fdb92f4c59ae9355b019c422418b2e6cc24
Summary: Allow iOS to have similar accessibility functionality to Android. This PR exposes the `accessibilityElementsHidden` property on iOS which is similar to Android's `importantForAccessibility="no-hide-descendants"` I didn't see any existing examples for testing native props being passed through, but I did add an example to the RNTester app. I've attached some screenshots using the Accessibility Inspector to verify the property was correctly passed through.   I've updated the website with appropriate documentation. facebook/react-native-website#141   [IOS] [FEATURE] [View] - Added accessibilityElementsHidden property Closes facebook/react-native#17627 Differential Revision: D6806444 Pulled By: hramos fbshipit-source-id: 50d31fdb92f4c59ae9355b019c422418b2e6cc24
Motivation
Allow iOS to have similar accessibility functionality to Android. This PR exposes the
accessibilityElementsHidden
property on iOS which is similar to Android'simportantForAccessibility="no-hide-descendants"
Test Plan
I didn't see any existing examples for testing native props being passed through, but I did add an example to the RNTester app. I've attached some screenshots using the Accessibility Inspector to verify the property was correctly passed through.
Related PRs
I've updated the website with appropriate documentation.
facebook/react-native-website#141
Release Notes
[IOS] [FEATURE] [View] - Added accessibilityElementsHidden property