voiceover

How to stop Text to Speech when Voiceover is speaking, or vice versa in Swift?

删除回忆录丶 提交于 2020-07-05 09:18:17
问题 Right now, my app implements AVSpeechSynthesizer to read out instructions for each screen. The app also takes into consideration when Voiceover accessibility feature is enabled. The problem I'm facing now is that the text to speech feature overlaps with the voiceover feature. Is there a solution to detect that when a user navigates to another element on the screen, TTS stops speaking, or when TTS is speaking, voiceover doesn't speak until TTS finishes (the former is preferred though). The

Combine UISwitch and UITableViewCell for VoiceOver interaction

丶灬走出姿态 提交于 2020-06-27 06:47:54
问题 In Calendar, when you create a new event, if you tap on the All Day cell with VoiceOver enabled, Siri says "All Day switch button on/off, double tap to change setting". And indeed double tapping will toggle the switch. Also, it's not possible to tap on just the toggle switch itself - you have to interact with the cell itself to toggle the switch, the switch itself is not an accessible element. In my app I have the exact same setup with a label and a switch. But when I tap the cell with

iOS 8.4: Scroll view resets contentOffset with Voice Over enabled shortly after view appear

被刻印的时光 ゝ 提交于 2020-06-24 13:42:47
问题 With Voice Over enabled scroll views reset their preset contentOffset a second after view did appear. It happens on iOS 8.4 devices, no reproduction for 9.0. Looks some internal UIScrollViewAccessibility code forces scroll view to setContent: for zero when becoming focused. Didn't find any way to evade this. Any thoughts? Related code sample illustrates the bug. Just create a view with collection view, create a cell with reuse id "Cell" and put a label on it. @interface ViewController ()

iOS 8.4: Scroll view resets contentOffset with Voice Over enabled shortly after view appear

拟墨画扇 提交于 2020-06-24 13:42:21
问题 With Voice Over enabled scroll views reset their preset contentOffset a second after view did appear. It happens on iOS 8.4 devices, no reproduction for 9.0. Looks some internal UIScrollViewAccessibility code forces scroll view to setContent: for zero when becoming focused. Didn't find any way to evade this. Any thoughts? Related code sample illustrates the bug. Just create a view with collection view, create a cell with reuse id "Cell" and put a label on it. @interface ViewController ()

Making dynamically updating content in a UITableView accessible for VoiceOver

谁都会走 提交于 2020-06-16 02:20:07
问题 I'm trying to make my app more accessible and so far the standard accessibility things like labels and hints are doing wonders. I'm hitting a problem however with dynamically updating content that's displayed in a UITableView. Each row of the table updates every second or so, but if I try to create each cell's accessibilityLabel at this point then I find that there is a problem with the VoiceOver reading out the selected label keeps interrupting itself as the label contents changes so the

Use aria-label on a span

白昼怎懂夜的黑 提交于 2020-05-17 07:17:05
问题 I'm showing product ratings using Unicode star symbols. iOS VoiceOver doesn't read this aloud correctly, so I thought I'd use aria-label on my span to tell screen readers what it means. <span aria-label="4.0 stars out of 5, 123 ratings">★★★★☆ 4.0 (123)</span> It's not working. iOS VoiceOver ignores my aria-label completely. What am I doing wrong? How can I fix this? 回答1: The aria-label is sometimes ignored by some assistive technology if the element you put it on doesn't have any semantic

How do I get the currently focused element when using VoiceOver on iOS?

放肆的年华 提交于 2020-05-11 07:37:43
问题 I have a table with cells that the user may swipe to mark them "completed". I am trying to make this accessible using VoiceOver by implementing the accessbilityScroll method. This works fine, but I can't figure out what cell has focus when the user scrolls. I only find information on how to change focus. 回答1: Hehe, Ok. I just figured it out. There is a protocol for this. Its called UIAccessibilityFocus Method: accessibilityElementDidBecomeFocused: Well, I will leave this question here to any

How do I get the currently focused element when using VoiceOver on iOS?

倖福魔咒の 提交于 2020-05-11 07:37:03
问题 I have a table with cells that the user may swipe to mark them "completed". I am trying to make this accessible using VoiceOver by implementing the accessbilityScroll method. This works fine, but I can't figure out what cell has focus when the user scrolls. I only find information on how to change focus. 回答1: Hehe, Ok. I just figured it out. There is a protocol for this. Its called UIAccessibilityFocus Method: accessibilityElementDidBecomeFocused: Well, I will leave this question here to any

Accessibility Custom Actions aren't announced in Swift

蹲街弑〆低调 提交于 2020-04-14 04:08:10
问题 When I add accessibilityCustomActions to an object, it works correctly on the device as far as being able to swipe up and down through the actions and select them, but there are no announcements that there are "Actions available" - should I write this in to the accessibilityLabel myself? I thought that by adding the custom actions to my object, it would announce "Actions available" automatically, or "Swipe up to select..." 回答1: I thought that by adding the custom actions to my object, it

iOS UITest: How to test custom accessibility actions?

做~自己de王妃 提交于 2020-03-21 11:51:05
问题 I want to support VoiceOver. I have an UIButton inside of an UITableViewCell . According to a best practice I have disabled the button for accessibility ( .isAccessibilityElement = false ) and implemented a custom accessibility action for the cell ( accessibilityCustomActions, NSAccessibilityCustomAction ). This way VoiceOver would not find and read the button as an own element. To make the feature behind the button accessible, I have added a custom accessibility action to the cell. With the