voiceover

iPhone - make VoiceOver announce label text change

泪湿孤枕 提交于 2019-12-13 12:01:20
问题 Is it possible using VoiceOver on the iPhone to announce the updated text on a label if it changes? This would be analogous to a live-region in ARIA. Thanks. 回答1: You can make VoiceOver announce any text you like with: UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"Your text"); If a label should announce its text as soon as it is updated, simply extend the UILabel and override the setText method. The .h File: @interface UIVoicedLabel : UILabel { } @end And its

Is there any way to create a custom VoiceOver gesture?

僤鯓⒐⒋嵵緔 提交于 2019-12-13 00:03:43
问题 Is there any way to create a custom gesture in iOS specifically for VoiceOver users? Thank you 回答1: I think this MIGHT be possible. The iOS Mail app (at least in iOS 6) seems to contain custom Voiceover actions (you can swipe up or down to enable a "delete" operation on a mail item in the list). My guess is (and I haven't verified this, is that if you add a swipe recogonizer only when UIAccessibilityIsVoiceOverRunning() returns true. I haven't tested this yet. 回答2: I'm almost certain that

VoiceOver navigation doesn't work on tab panels if wrapper has aria-label

风格不统一 提交于 2019-12-12 21:14:14
问题 I recently noticed a very weird problem with VoiceOver's web navigation on tabs and tab panels. In particular, if the wrapper wrapping the tabs and tab panels has attribute aria-label set, then VoiceOver navigation cannot navigate to tab panel when switching tabs. The problem may be hard to describe by words, thus I created this fiddle to demonstrate. Notice that the outside wrapper div has aria-label="Wrapper" . Below are the steps to recreate the problem: Run the jsFiddle to get the result

Firing touchesBegan on a MKMapView with VoiceOver enabled

*爱你&永不变心* 提交于 2019-12-12 03:43:55
问题 As an exercise with accessibility and a personal challenge to myself I decided that I'd like to write a relatively simple app. The app would show an MKMapView of the United States and when you tap anywhere on it, it uses an MKReverseGeocoder to show you the locality, state and country where you tapped. This works fine, although I have to hijack the touch events by adding a WildcardGestureRecognizer to the MKMapView . This works great with VoiceOver turned off. When I turn VoiceOver on and tap

UIAccessibility in gridView - doesn't see new cells

ε祈祈猫儿з 提交于 2019-12-12 02:19:59
问题 In my project I have tableView, as a row there is a custom UITableViewCell, that has one of it property - GMGridView (its similar to a UICollectionView), it has its delegate methods: - (GMGridViewCell *)GMGridView:(GMGridView *)gridView cellForItemAtIndex:(NSInteger)index { GMGridViewCell *cell = [gridView dequeueReusableCell]; if (!cell) { cell = [[GMGridViewCell alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; cell.contentView = [[GridViewContentView alloc] initWithFrame

accessibilityIncrement / Decrement not called

家住魔仙堡 提交于 2019-12-12 01:12:50
问题 I looked and cannot find an answer that works for me. I have subclassed UIControl to create a double-knob slider control. I want each knob to be available for voiceover. To do this, I create UIAccessibilityElements and add them to an array: func addAccessibilityElements() { axKnobs = [] let lowKnob = UIAccessibilityElement(accessibilityContainer: self) lowKnob.accessibilityLabel = doubleKnob ? lowValueKnobAccessibilityLabel : valueKnobAccessibilityLabel lowKnob.accessibilityPath =

Set voice over focus on UITextView

痴心易碎 提交于 2019-12-11 18:27:51
问题 How can I set voice over focus on my element (such like UITextView ) in iOS 6. Is it possible? 回答1: Very simple. Just do this: UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, textView); Note that it may not work, depending on where and when you use it. If you're trying to set the focus to a particular element from viewDidLoad , the code probably won't work correctly. This is because VoiceOver makes its own attempt to set the VoiceOver focus on an element initially;

Disabling accessibility for a table column

爱⌒轻易说出口 提交于 2019-12-11 16:33:21
问题 I have a normal NSTableView that displays a list of tracks. I have dedicated a table column to displaying an icon that indicates which track is currently playing. I'm working on adding fuller VoiceOver support and I don't like how when each row in the table is selected the first thing said is "image". I would like to disable accessibility for that specific table column. I know I can do this by subclassing either NSTableView and/or NSTableColumn to return YES from accessibilityIsIgnored. Is

UIAccessibilityTrait adjustable does not enter increment() or decrement() swift

拈花ヽ惹草 提交于 2019-12-11 12:53:47
问题 I have an element (an imageView) which shows a number. I want the voice over user to swipe up to increment and swipe down to decrement. There are a total of six numbers (images) and each number shoes different content on screen. For that intent I made the view adjustable: imageView.accessibilityTraits = .adjustable I also implemented the following methods: override func accessibilityIncrement() { print("increment") } override func accessibilityDecrement() { print("decrement") } However, when

Dismiss a UIKeyboardTypeNumberPad in a UITextField when VoiceOver is active?

柔情痞子 提交于 2019-12-11 11:10:09
问题 How do I dismiss a UITextField with keyboard type UIKeyboardTypeNumberPad ? The accepted answer to this question suggests to either add a bar with a dismiss button as an inputAccessoryView or to listen to touch events on the background. I prefer the second approach, i.e. listen to touch events on the view containing the UITextField . However, this approach fails if VoiceOver is active. How do you resignFirstResponder in that situation? 回答1: You need an alternative way to perform the gesture.