Automate VoiceOver for testing web applications.
- Open VoiceOver Utility and check "Allow VoiceOver to be controller with AppleScript".
- Enable Terminal app in System Preferences > Security & Privacy > Privacy > Accessibility.
- Accept Terminal VoiceOver automation permissions when prompted. (You can manage these later in System Preferences > Security & Privacy > Privacy > Automation).
- Optional: disable Dication shortcut under System Preferences > Keyboard > Dictation.
Running the cli outputs the phrases spoken by the screen reader to stdout.
$ npx @accesslint/auto-vo --url https://example.com --limit 5 --until 'Example'
--url URL
- where URL is the url to test
--limit n
- where n is the maximum number of cursor moves
--until s
- where s is a search term, after which the script ends. supercedes --limit
.
--quiet
- do not print to stdout
For programmatic usage, see VoiceOver.js, a standalone driver for VoiceOver screen reader on macOS.