Skip to main content

Getting Started

Guidepup is a screen reader driver for test automation.

It aims to provide a reliable set of APIs to automate your screen reader a11y workflows through JavaScript. Specifically to accommodate the needs of a11y testing and alleviate the overhead of manual testing with real screen readers.

Contents

Environment Setup

Setup your environment for screen reader automation with @guidepup/setup:

npx @guidepup/setup

For some operating systems, enabling automation of screen readers is tightly controlled. This CLI handles the setup for your OS.

For further information checkout this guide to set up your environment.

Installation

Install Guidepup to your project:

yarn add @guidepup/guidepup
yarn add @guidepup/guidepup

First Screen Reader Code

Let's automate a screen reader!

Create example.js (or example.ts for TypeScript) to define your screen reader code.

If you're using MacOS:

./example.ts
import { voiceOver } from "@guidepup/guidepup";

(async () => {
// Start VoiceOver.
await voiceOver.start();

// Move to the next item.
await voiceOver.next();

// Stop VoiceOver.
await voiceOver.stop();
})();

Or if you're using Windows:

./example.ts
import { nvda } from "@guidepup/guidepup";

(async () => {
// Start NVDA.
await nvda.start();

// Move to the next item.
await nvda.next();

// Stop NVDA.
await nvda.stop();
})();

Now run your code to see an automated screen reader!

npx ts-node example.ts