Skip to main content

NavigateOptions

Extends: CommandOptions

Options for the screen reader navigate until operations.

For example:

import { voiceOver } from "@guidepup/guidepup";

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

// Navigate to the next location until partial matching "Home", navigating at
// most 20 times before throwing an error for a failed search.
await voiceOver.navigateNextUntil(/Home/, { maxNavigationAttempts: 20 });

// Navigate to the next heading until partial matching "Links", navigating at
// most 10 times, as the default, before throwing an error for a failed
// search.
await voiceOver.navigateNextHeadingUntil(/Links/);

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

See also:

Contents:

Optional: Maximum number of navigation commands before the search fails. Defaults to 10 if not provided.

Type: number