You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
importantForAccessibility=Yes set on parent view has no effect on iOS #586
I currently have web on top of my mind and will try to test this one later (it's been delayed by various things, but I'm pretty close to returning to the accessibility API refactoring). And I suppose that adding some accessibilityTrait (for example, button — depends on the actual use case) and/or touch handler to the View might help.
So, we can temporarily add one more platform-dependent property to current RX API, while new API is in progress. It also might make sense to reflect which accessibility properties are applicable to which platforms. But if it's not a critical issue with no workaround (which I doubt given the above info), I would rather wait for the new API.
Do you have an ETA on when the new API will be available? This isn't a pressing issue on our side yet. I haven't found a workaround using RX (tried adding trait, wasn't successful) and don't want to introduce platform specific throwaway RN code especially if a new API will come up in time :)
I work on Marat Abdullin (@mshoho)'s team. Let me provide more information about how we're using ReactXP's accessibility API so you can better understand its design.
In Skype, we've made some modifications to React Native's accessibility implementation. We want to contribute our changes upstream but we have to do more work first to resolve inconsistencies in the implementation between iOS and Android. We don't have an ETA for when that will be finished. Here are some details on what we've done:
In the public React Native, importantForAccessibility is only supported on Android. We've ported this prop to iOS. We've also ported it to Windows and the Windows work is already publicly available.
We've deleted the accessibility prop because we've found that importantForAccessibility covers all scenarios covered by accessibility and then some.
The last time I spoke with @mshoho about this topic, the plan was to add additional iOS-only accessibility props to RN and then @mshoho was going to build a cross-platform accessibility API on top of this in RX. A new iOS-only accessibility prop was already merged into RN (accessibilityElementsHidden).
@mshoho, do you have any updates on the execution of this plan?
Newer RN versions have accessibilityElementsHidden property which is iOS-only way to do importantForAccessibility=NoHideDescendants.
I am still in progress with the accessibility API refactoring which is going to help addressing the platform specific madness without polluting the global API with the platform-specific accessibility props. It takes longer than expected but the current plan (if nothing will blow up again) is to start testing it internally by the end of September. And then make a public PR.
jessamp, in your example you're using the prop accessibilityElementsHidden rather than importantForAccessibility. I'm going to assume your question is about importantForAccessibility.
It's important to distinguish the public version of React Native from the private fork of React Native that Skype is currently using.
When building an app against the public version of React Native, importantForAccessibility doesn't do anything on iOS.
In Skype's private fork of React Native, we ported importantForAccessibility to iOS. In Skype's React Native fork, your example should behave the same way on iOS and Android.
We want to contribute a solution to this problem to Facebook's official public React Native repo. However, after thinking about the best way to do this, we decided to change our approach. Instead of adding an iOS implementation of importantForAccessibility, we will rely on iOS-specific React Native props like accessible and accessibilityElementsHidden. We (Marat Abdullin (@mshoho)) will change the implementation of ReactXP's accessibility API such that it'll consume these public iOS-only React Native accessibility props. As Marat Abdullin (@mshoho) mentioned in his latest post, he hopes to begin testing this solution internally at the end of September.
jessamp The public version of React Native has an importantForAccessibility prop that only works on Android. We looked at the contract that the importantForAccessibility props exposes to apps and then implemented this same contract on iOS.
Activity
erictraut commentedon Apr 3, 2018
Marat Abdullin (@mshoho), any thoughts about this one?
mshoho commentedon Apr 3, 2018
importantForAccessibility is an Android-only property in mobile RN (https://facebook.github.io/react-native/docs/accessibility.html#importantforaccessibility-android). And currently RX on mobile just passes the props to RN (on web we try map importantForAccessibility to aria-hidden).
I currently have web on top of my mind and will try to test this one later (it's been delayed by various things, but I'm pretty close to returning to the accessibility API refactoring). And I suppose that adding some accessibilityTrait (for example, button — depends on the actual use case) and/or touch handler to the View might help.
There is also one RN accessibility property missing in the current set of RX props — https://facebook.github.io/react-native/docs/accessibility.html#accessible-ios-android — the example there is exactly the same as the example above.
So, we can temporarily add one more platform-dependent property to current RX API, while new API is in progress. It also might make sense to reflect which accessibility properties are applicable to which platforms. But if it's not a critical issue with no workaround (which I doubt given the above info), I would rather wait for the new API.
qchen-ms commentedon Apr 3, 2018
Hey Marat Abdullin (@mshoho),
Do you have an ETA on when the new API will be available? This isn't a pressing issue on our side yet. I haven't found a workaround using RX (tried adding trait, wasn't successful) and don't want to introduce platform specific throwaway RN code especially if a new API will come up in time :)
Thanks,
Chen
rigdern commentedon Apr 18, 2018
I work on Marat Abdullin (@mshoho)'s team. Let me provide more information about how we're using ReactXP's accessibility API so you can better understand its design.
In Skype, we've made some modifications to React Native's accessibility implementation. We want to contribute our changes upstream but we have to do more work first to resolve inconsistencies in the implementation between iOS and Android. We don't have an ETA for when that will be finished. Here are some details on what we've done:
In the public React Native,
importantForAccessibilityis only supported on Android. We've ported this prop to iOS. We've also ported it to Windows and the Windows work is already publicly available.We've deleted the
accessibilityprop because we've found thatimportantForAccessibilitycovers all scenarios covered byaccessibilityand then some.erictraut commentedon Sep 8, 2018
Adam Comella (@rigdern), any update on this one? Has the PR been accepted into RN?
rigdern commentedon Sep 8, 2018
mshoho commentedon Sep 8, 2018
Newer RN versions have
accessibilityElementsHiddenproperty which is iOS-only way to do importantForAccessibility=NoHideDescendants.I am still in progress with the accessibility API refactoring which is going to help addressing the platform specific madness without polluting the global API with the platform-specific accessibility props. It takes longer than expected but the current plan (if nothing will blow up again) is to start testing it internally by the end of September. And then make a public PR.
jessamp commentedon Sep 13, 2018
Adam Comella (@rigdern) you said that you've ported the importantForAccessibility prop to IOS. Do you mean that in this example:
VoiceOver in IOS will read "Text one text two"? Or is that coming with the new API?
rigdern commentedon Sep 17, 2018
jessamp, in your example you're using the prop
accessibilityElementsHiddenrather thanimportantForAccessibility. I'm going to assume your question is aboutimportantForAccessibility.It's important to distinguish the public version of React Native from the private fork of React Native that Skype is currently using.
When building an app against the public version of React Native,
importantForAccessibilitydoesn't do anything on iOS.In Skype's private fork of React Native, we ported
importantForAccessibilityto iOS. In Skype's React Native fork, your example should behave the same way on iOS and Android.We want to contribute a solution to this problem to Facebook's official public React Native repo. However, after thinking about the best way to do this, we decided to change our approach. Instead of adding an iOS implementation of
importantForAccessibility, we will rely on iOS-specific React Native props likeaccessibleandaccessibilityElementsHidden. We (Marat Abdullin (@mshoho)) will change the implementation of ReactXP's accessibility API such that it'll consume these public iOS-only React Native accessibility props. As Marat Abdullin (@mshoho) mentioned in his latest post, he hopes to begin testing this solution internally at the end of September.Does that answer your question?
jessamp commentedon Sep 17, 2018
Adam Comella (@rigdern) yes it does. Thanks!
What do you mean by "ported
importantForAccessibilityto iOS"?rigdern commentedon Sep 17, 2018
jessamp The public version of React Native has an
importantForAccessibilityprop that only works on Android. We looked at the contract that theimportantForAccessibilityprops exposes to apps and then implemented this same contract on iOS.jessamp commentedon Sep 19, 2018
Marat Abdullin (@mshoho) are these changing going to utilize the new cross-platform accessibility features in RN 0.57?
fbartho commentedon Aug 9, 2020
Happy to close this in favor of #1126!