2

I want to turn on and off Apples's voiceover on the MacOS possibly using a browser plugin.

Is this possible? If so what permissions are required?

1 Answers1

1

I did some research on your question and while it looks like there are ways to force VoiceOver to speak (e.g. using NSAccessibilityPostNotification), VoiceOver needs to be enabled by the user to begin with. Apple wants the user to control this and really does NOT want you, the developer, to toggle this setting programmatically.

One potential, disgusting hack you could try (and I wouldn't do it in production/shipping code myself) would be to force VoiceOver on via running an AppleScript. E.G. a script that looks like this:

tell application "VoiceOver"
    output "VoiceOver is now on"
end tell

appears to force VoiceOver to on, at least from the ScriptEditor.

On the other hand, if your users are not accustomed to VoiceOver, they will be confused and potentially furious with you.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • As far as I can tell, this doesn't work in macOS 10.15.5. The command hangs and times out. VoiceOver _can_ be _controlled_ programmatically via AppleScript, but only when configured in [VoiceOver Utilities][1] to allow AppleScript automation, and only once its enabled via user input (Command F5 or triple click of the touch ID button). [1]: https://www.apple.com/voiceover/info/guide/_1126.html – ckundo Jun 17 '20 at 00:41