Re: Custom Actions for VoiceOver on Mac?
Re: Custom Actions for VoiceOver on Mac?
- Subject: Re: Custom Actions for VoiceOver on Mac?
- From: Chi Kim <email@hidden>
- Date: Fri, 11 Jan 2019 15:06:46 +0000
- Thread-topic: Custom Actions for VoiceOver on Mac?
HI All,
To follow up my question... I found NSAccessibilityCustomAction for MacOS.
I was hoping for "Do Something" to appear in the action list when
pressing vo+command+space, but only "press" was in the choice.
Could someone let me know what I"m missing?
Here's the code.
@IBOutlet var goButton: NSButton!
@objc func doSomething() -> Bool {
print("Did something!")
return true
}
override func viewDidLoad() {
super.viewDidLoad()
let action = NSAccessibilityCustomAction(name: "Do Something!",
target: self, selector: #selector(doSomething))
goButton.setAccessibilityCustomActions([action])
}
I also tried setting the target to goButton instead of self, but it
didn't seem to make difference.
Thank you for your help!
Chi
On 1/10/2019 7:55 AM, Chi Kim wrote:
> Hello,
>
>
> When you press vo+command+space on an ui element, it gives choices for
> all actions.
>
> Is there a way to build custom actions for VoiceOver on Mac like
> UIAccessibilityCustomAction on iOS?
>
> Thanks!
>
>
> Chi
>
>
_______________________________________________
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