uiaccessibility

XCUIElement hierarchy within UITableViewCell

余生颓废 提交于 2020-01-05 12:16:07
问题 I encountered a strange behaviour in UI-tests. When I add a custom view into UITableViewCell, some of it's subviews are not accessible. However, it's OK in Xcode's Debug View Hierarchy. Yes, I know about UIAccessibilityContainer but it's not a solution cause of: 1. there are regular subviews in my custom view (views, labels, images), not a drawn content. 2. I can't disable isAccessibilityElement for containerView and enable it for ImageView cause of I need both in the same time. So, when I

How to control which UIAccessibilityElement receives focus after posting screen change notification?

老子叫甜甜 提交于 2020-01-05 10:08:42
问题 I have an overlay with accessible elements. When it disappears, I post UIAccessibilityScreenChangedNotification to cause VoiceOver update. VoiceOver then picks first element of the screen. How can I make it focus on a specific element by default after posting UIAccessibilityScreenChangedNotification ? 回答1: When you post the notification you can supply additional information which is either an NSString object that VoiceOver speaks or an accessibility element that VoiceOver moves to.

How to control which UIAccessibilityElement receives focus after posting screen change notification?

假装没事ソ 提交于 2020-01-05 10:07:31
问题 I have an overlay with accessible elements. When it disappears, I post UIAccessibilityScreenChangedNotification to cause VoiceOver update. VoiceOver then picks first element of the screen. How can I make it focus on a specific element by default after posting UIAccessibilityScreenChangedNotification ? 回答1: When you post the notification you can supply additional information which is either an NSString object that VoiceOver speaks or an accessibility element that VoiceOver moves to.

iOS 13 Voice Control Accessibility Feature - is there a way to do more custom actions (rather than just linking to accessibility labels)?

梦想与她 提交于 2020-01-05 04:27:21
问题 The new Voice Control API is super cool, it's the one where you can speak to your iOS device and perform actions. (Video from Apple) My only gripe is that finding information on it is kinda difficult. I don't see any WWDC videos out there on it, and I can't find any other documentation. It's basically powered by accessibilityLabels. Since each accessibilityElement can really only have one accessibilityLabel it's (from what I can see) limited to that. Is that accurate? Is there a way to

How to check if Button Shapes is enabled? [duplicate]

怎甘沉沦 提交于 2020-01-04 07:44:32
问题 This question already has answers here : How to check if the Button Shapes setting is enabled? (6 answers) Closed 11 months ago . How do I check, using UIAccessibility, if the Button Shapes option in the iOS device accessibility settings is enabled? I want to support that 'button style' on a custom made button. 回答1: I converted the code from this post to Swift: import UIKit public extension UIAccessibility { public static var isButtonShapesEnabled: Bool { let button = UIButton() button

iOS: UIAccessibility (Voice Over) with checkbox is not working properly

谁都会走 提交于 2019-12-24 17:03:51
问题 I am using voice over on checkbox. 
 The issue I am facing here is, when user selects the checkbox for the first time it says 'checkbox selected' (which is correct as per accessibilityLabel set) but next time when user tries to de-select it says 'checkbox selected, checkbox de-selected' where it should only say 'checkbox de-selected', vice-a-versa. 
 So what is happening here is that, the previously set accessibilityLabel is not getting cleared up and when user tries to select or de-select it

Can I influence what appears in the VoiceOver rotor?

我怕爱的太早我们不能终老 提交于 2019-12-24 05:53:05
问题 I have a text based app where I want my users to make use of the 'Lines' rotor option when VoiceOver is enabled. However the option doesn't appear. The text in my app is laid out using cells in a tableview (the cells contain UILabels and other views). I'm afraid my implementation affects how the rotor is "seeing" my app, but I think it's unfortunate if it limits me from supporting the rotor fully. Is there any way I can make use of the 'Lines' option in the rotor? 回答1: I think you are looking

UIAccessibilityContainer in child view controllers?

限于喜欢 提交于 2019-12-23 22:04:43
问题 I have a parent UIViewController to which I add four child view controllers. I’m trying to manage accessibility throughout those controllers. I have a status enum which keeps track of which of those children are visible on-screen, so when that changes, I’m updating the accessibilityElementsHidden of the children as appropriate, and sending a LayoutChanged notification. My question relates to implementing the UIAccessibilityContainer protocol in both the parent view controller, and inside each

UIAccessibilityFocus protocol not working

荒凉一梦 提交于 2019-12-23 17:26:16
问题 I want to know when a user shifts the focus away from an accessibility element. I have tried overriding the accessibilityElementDidLoseFocus() and accessibilityElementDidBecomeFocused() methods but the methods doesn't seem to be called upon when I navigate to other elements in VoiceOver accessibility mode. I have no idea what is wrong. Is there anything else that I should do to activate these methods? override func accessibilityElementDidBecomeFocused() { println("become focused") } override

Custom VoiceOver actions in UITableViewCell

不想你离开。 提交于 2019-12-22 03:59:27
问题 When a UITableView is editable, its UITableViewCells allow the user to perform custom actions when VoiceOver is on. The user can hear the available actions by swiping up or down while the VoiceOver cursor is on the cell and then invoke the actions by double tapping anywhere on the screen. There are only two actions available in my cells: Delete (invokes the usual cell deletion) and Default (invokes a tap on the cell). My question is two-fold: Is there a way of adding custom VoiceOver actions