Hey Tyler.
Does the NSAccessibilityPostNotificationWithUserInfo call still works for 
you under El Capitan? After installing 10.11 this suddenly broke for me.
Are you noticing the same?


On Monday, July 21, 2014 at 5:15:05 AM UTC-7, anders wrote:
>
> Hi!
> What does this do really?
> I don't understand.
> /A
> 20 jul 2014 kl. 23:49 skrev Alex Hall <[email protected] <javascript:>>:
>
> This looks like what I've been searching for for a while now, thanks for 
> sharing! What is the second parameter, though? Can it be nil,or does it 
> need to be some NSView object or subclass? Also, in your demo, why provide 
> the string "Hi" instead of using the string that was passed n? I just want 
> to be sure I understand the process. Thanks again.
> On Jul 20, 2014, at 5:08 PM, Tyler Thompson <[email protected] 
> <javascript:>> wrote:
>
> Hello, this is a tidbit for those of you interested in developing for OSX,
>
> I have dug through tons of documentation on VoiceOver accessibility and 
> submitted several support tickets to apple for assistance and I finally 
> wrote this function I thought I’d share with everybody:
>
> -(void)speakString:(NSString *)stringToSpeak 
> fromFocusedUIElement:(id)object
> {
>         NSDictionary *announcementInfo = [[NSDictionary alloc] 
> initWithObjectsAndKeys:stringToSpeak, NSAccessibilityAnnouncementKey, 
> @“High", NSAccessibilityPriorityKey, nil];
>         NSAccessibilityPostNotificationWithUserInfo(object, 
> NSAccessibilityAnnouncementRequestedNotification, announcementInfo);
> }
>
> This could easily be expanded on, for instance we could include in this 
> function a way to tell the object that currently has keyboard focus to 
> assure that VoiceOver always speaks the string as opposed to you having to 
> figure it out. We could also add a NSAccessibilityLayoutChanged 
> notification to refresh the braille display (Although in some very bizarre 
> cases this causes VoiceOver to speak twice (once with the announcement, 
> once for the layout change). In other cases the announcement interrupts the 
> layout change notification or visa versa, I have yet to figure that bit 
> out. 
>
> However I felt like this code snippet could do some people good, so there 
> it is.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at http://groups.google.com/group/macvisionaries.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Have a great day,
> Alex Hall
> [email protected] <javascript:>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at http://groups.google.com/group/macvisionaries.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
The following information is important for all members of the Mac Visionaries 
list.

If you have any questions or concerns about the running of this list, or if you 
feel that a member's post is inappropriate, please contact the owners or 
moderators directly rather than posting on the list itself.

Your Mac Visionaries list moderator is Mark Taylor and your owner is Cara Quinn 
- you can reach Cara at [email protected]

The archives for this list can be searched at:
http://www.mail-archive.com/[email protected]/
--- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/macvisionaries.
For more options, visit https://groups.google.com/d/optout.

Reply via email to