简体   繁体   English

在 React Native-iOS 的外部视图中,当 access={true} 时,使内部元素可访问

[英]Make the inner elements accessible when accessible={true} for the outer view in React native- iOS

I am very new to react native.我对本地反应很陌生。 I have a view which is having a text containing a url.我有一个视图,其中包含一个包含 url 的文本。 I want to make the outer view accessible and then when the user swipes right it should focus on the url/link as we do in iOS.我想让外部视图可访问,然后当用户向右滑动时,它应该像我们在 iOS 中那样专注于 url/link。 For me when I make the outer view accessible={true} the inner elements will be non accessible.对我来说,当我使外部视图可访问={true} 时,内部元素将不可访问。 And also I am not able to find out much content regarding the same.而且我也无法找到很多关于相同的内容。 Can anyone give an insight on this.任何人都可以对此提供见解。

 <View><Text>Some text</Text><View>
 <View><Text>Text with url</Text></View>
 </View>

As I mentioned above I want both outer and inner views accessible.正如我上面提到的,我希望可以访问外部和内部视图。 It works fine in android but not in iOS.Any help is appreciated.它在 android 中运行良好,但在 iOS 中不能正常工作。感谢任何帮助。

After some investigation on the above issue, I reached to a conclusion like, in iOS if we add accessibile={true} to the outer view , it will not allow the inner views to be accessible which is the default behaviour in iOS.在对上述问题进行了一些调查之后,我得出了一个结论,例如,在 iOS 中,如果我们将 accessibile={true} 添加到外部视图,它将不允许访问内部视图,这是 iOS 中的默认行为。 In android normally it works in the other way.在android中,它通常以另一种方式工作。 Android equivalent of accessible property is 'importantForAccessibility'. Android 中可访问属性的等效项是“importantForAccessibility”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 react native a11y:将元素分组以获得更好的画外音通知,同时仍然暴露内部可访问元素 - react native a11y: grouping elements for better voiceover announcement while still exposing inner accessible elements 新的 React Native 元素不可访问 - New react native element is not accessible React Native - 在 iOS 上禁用 Flipper 使用 Hermes - React Native- Using Hermes with Flipper disabled on iOS iOS 可访问性:使 UITextField 和指定的子视图可访问 - iOS Accessibility: make UITextField and specified subview accessible 如何使用 React Native 将 pdf 文件保存到文件系统(ios/android),可以在应用程序外部访问 - How to save a pdf file to file system (ios/android) with react native which can be accessible outside the app 使iOS和watchOS应用程序可以访问SwiftyUserDefaults数组 - Make SwiftyUserDefaults array accessible to iOS and watchOS app 如何在 React Native 中访问嵌套的 Text 元素中的链接? - How can I make a link in a nested Text element accessible in React Native? 在iOS上使用密码锁定时,无法访问粘贴板 - Pasteboard not accessible when locked with passcode on iOS 使用点击手势时无法访问表格视图 - Table view not accessible when using tap gesture 在Xcode 9 / Swift 4中不再可以访问本机UIKit元素的子视图吗? - Native UIKit elements' subviews are no longer accessible in Xcode 9 / Swift 4?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM