Re: How to support voiceover in an NSView subclass that is spontaneously changing
Re: How to support voiceover in an NSView subclass that is spontaneously changing
- Subject: Re: How to support voiceover in an NSView subclass that is spontaneously changing
- From: Peter Lübke <email@hidden>
- Date: Mon, 17 Jan 2011 01:45:40 +0100
I'd try queueing your voiceovers doing something like this:
-set up a timer which checks if there's anything going on on the sound output device. You can use the +isAnyApplicationSpeaking CLASS method from NSSpeechSynthesizer to check this. - as soon as the sound output device is "open", send the NSAccessibilityValueChangedNotification from this timer.
This way, you won't have to change anything concerning the user, and nothing else in your code. Seems fairly easy to me and not at all weird:-)
-Peter
Am 16.01.2011 um 02:48 schrieb George Nachman: That's a useful page, but it looks like the techniques described there are an alternative to the built-in accessibility APIs. Do many applications decide not to use VoiceOver and do their own speech synthesis? I want to make sure it's a good experience for VO users and not do anything too weird. How weird would it be to go this way?
2011/1/15 Peter Lübke <email@hidden> Hi George, take a brief look at:
- Peter Am 14.01.2011 um 07:36 schrieb George Nachman: Hi accessibility-dev,
I have a custom NSView subclass that displays text received from a server. Text comes in unpredictably--sometimes a bunch quickly, sometimes slowly. My goal is to get voiceover to work properly with this. So far what I've done is to post a NSAccessibilityValueChangedNotification notification whenever new text is received and to have -accessibilityAttributeValue: return whatever text is new since its last call as a NSAccessibilityValueDescriptionAttribute (I'm using NSAccessibilityValueIndicatorRole as my NSAccessibilityRoleAttribute). This works, but the problem is that if I get two updates in quick succession, the voiceover for the first one is aborted and the second one is played instead.
I could rate limit them, but to do so optimally would require trying to guess how long voiceover will take to speak a phrase, and I'm sure that's nontrivial. Any better ideas? Can I do this by fiddling with the accessibility hierarchy somehow?
Thanks! -George
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden