voiceover

Can we perform automation testing on voice overs?

拥有回忆 提交于 2021-02-11 06:51:32
问题 I want to validate what voice over says on my app Can i automate voice overs or it can be done only manually? 回答1: 1/. Use Unit Tests to check every property of your accessible elements (label, hint, trait...) . 2/. Take a look at the DEQUE solution dedicated to iOS. 3/. The GTXiLib open source framework is also a good solution even if it's written in ObjC. :o) However, UI Testing (Xcode 10, iOS 12) is off the table because custom actions for instance are unreachable. Take a look at this

Disable image recognition for UIImageView on iOS 14 with VoiceOver

血红的双手。 提交于 2021-02-10 06:48:16
问题 I have a UIImageView as the background for a view. User interaction is disabled. isAccessibilityElement is set to NO. This is verified by using debug view hierarchy when the app is running on device. And yet when I tap on the view that has that as the background is describes all the controls on it and then describes the image using automatic image recognition. Everything I've found online says this is a new iOS 14 feature and that it's great, but says nothing about how I can turn it off. I

Disable image recognition for UIImageView on iOS 14 with VoiceOver

我与影子孤独终老i 提交于 2021-02-10 06:47:26
问题 I have a UIImageView as the background for a view. User interaction is disabled. isAccessibilityElement is set to NO. This is verified by using debug view hierarchy when the app is running on device. And yet when I tap on the view that has that as the background is describes all the controls on it and then describes the image using automatic image recognition. Everything I've found online says this is a new iOS 14 feature and that it's great, but says nothing about how I can turn it off. I

VoiceOver reads accessibility label twice when focusing non-UILabel titleView

十年热恋 提交于 2021-02-10 06:18:37
问题 I'm encountering a strange issue with VoiceOver. Goals: Set a UIStackView containing multiple UILabel 's as my navigationItem.titleView . Mark the stack view as an accessibility element and set its accessibilityLabel to an appropriate value. Set the stack view as the initial VoiceOver focus by calling UIAccessibility.post(notification: .screenChanged, argument: navigationItem.titleView) inside viewDidAppear(animated:) . Expected Result: When the view controller appears the focus appears to be

iOS voiceover for custom view displayed over uiviewcontroller

*爱你&永不变心* 提交于 2021-01-29 07:52:07
问题 I have a UIViewController let's call it MainViewController, a child controller instance (ChildViewController of type UITableViewController) is added to MainViewController the accessibility of the ChildViewController is set and voiceover works fine for the same. MainViewController has a toolbar button, on tap a custom view will be displayed as shown below //CustomView class func show() { UIView.animate(withDuration:0.5, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 5, options

stop voice over from saying the automatic hint for UIAccessibilityTrait adjustable (swift)

☆樱花仙子☆ 提交于 2021-01-27 20:09:38
问题 When having an element on screen that has the UIAccessibilityTrait .adjustable , Voice Over reads out the automatic hint provided by iOS, saying "swipe up or down with one finger to adjust the value". How do I stop iOS from saying that hint? I want voice over to only read my own accessibility hint. 回答1: How do I stop iOS from saying that hint? When you use an accessibility element whose trait is .adjustable , the system will automatically read out its hint and it's not possible to remove only

iOS VoiceOver “Heading not found”

纵然是瞬间 提交于 2021-01-27 06:01:42
问题 I have a UITableView where each UITableViewCell has 2 UILabels: 1 header and 1 content. The AccessibilityTrait of the header is set to "header". I'm able to see the trait set correctly when inspecting the simulator screen with Accessibility Inspector. But on the actual device, when I switch the rotor to "Headings", it only finds the navigation bar header, but does not find the headers in the UITableViewCells. 回答1: To get the accessibility elements with the header trait in your table view

iOS VoiceOver “Heading not found”

我怕爱的太早我们不能终老 提交于 2021-01-27 06:01:01
问题 I have a UITableView where each UITableViewCell has 2 UILabels: 1 header and 1 content. The AccessibilityTrait of the header is set to "header". I'm able to see the trait set correctly when inspecting the simulator screen with Accessibility Inspector. But on the actual device, when I switch the rotor to "Headings", it only finds the navigation bar header, but does not find the headers in the UITableViewCells. 回答1: To get the accessibility elements with the header trait in your table view

Why is UIAccessibility.post(notification: .announcement, argument: “arg”) not announced in voice over?

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-29 06:26:46
问题 When using Voice Over in iOS, calling UIAccessibility.post(notification:argument:) to announce a field error doesn't actually announce the error. I have a submit button and, when focusing the button, voice over reads the button title as you would expect. When pressing the button, voice over reads the title again. When the submit button is pressed, I am doing some validation and, when there is a field error, I am trying to announce it by calling: if UIAccessibility.isVoiceOverRunning {

Disable / hide accessibility element

痞子三分冷 提交于 2020-12-05 11:24:07
问题 I'm trying to hide several elements in my app from VoiceOver so that they don't get read aloud by the screen reader. On iOS, I'd set isAccessibilityElement to NO , but this has no effect on OSX. What's the correct way to go about hiding elements from VoiceOver? For example, I have a series of labels contained inside a view that make no sense if they're spoken separately by VoiceOver. I'd like to set the accessibilityLabel on the container view to describe all the labels nested within. But if