VirtualCommands
Extends: object
Implements: Record<string, string>
Collection of Virtual Screen Reader commands.
Use with the perform
command to invoke an action:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next landmark.
await virtual.perform(virtual.commands.moveToNextLandmark);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Contents:
- virtualCommands.jumpToControlledElement
- virtualCommands.jumpToDetailsElement
- virtualCommands.jumpToErrorMessageElement
- virtualCommands.moveToNextAlternateReadingOrderElement
- virtualCommands.moveToPreviousAlternateReadingOrderElement
- virtualCommands.moveToNextBanner
- virtualCommands.moveToPreviousBanner
- virtualCommands.moveToNextComplementary
- virtualCommands.moveToPreviousComplementary
- virtualCommands.moveToNextContentinfo
- virtualCommands.moveToPreviousContentinfo
- virtualCommands.moveToNextFigure
- virtualCommands.moveToPreviousFigure
- virtualCommands.moveToNextForm
- virtualCommands.moveToPreviousForm
- virtualCommands.moveToNextHeading
- virtualCommands.moveToPreviousHeading
- virtualCommands.moveToNextHeadingLevel1
- virtualCommands.moveToPreviousHeadingLevel1
- virtualCommands.moveToNextHeadingLevel2
- virtualCommands.moveToPreviousHeadingLevel2
- virtualCommands.moveToNextHeadingLevel3
- virtualCommands.moveToPreviousHeadingLevel3
- virtualCommands.moveToNextHeadingLevel4
- virtualCommands.moveToPreviousHeadingLevel4
- virtualCommands.moveToNextHeadingLevel5
- virtualCommands.moveToPreviousHeadingLevel5
- virtualCommands.moveToNextHeadingLevel6
- virtualCommands.moveToPreviousHeadingLevel6
- virtualCommands.moveToNextLink
- virtualCommands.moveToPreviousLink
- virtualCommands.moveToNextMain
- virtualCommands.moveToPreviousMain
- virtualCommands.moveToNextNavigation
- virtualCommands.moveToPreviousNavigation
- virtualCommands.moveToNextRegion
- virtualCommands.moveToPreviousRegion
- virtualCommands.moveToNextSearch
- virtualCommands.moveToPreviousSearch
- virtualCommands.moveToNextLandmark
- virtualCommands.moveToPreviousLandmark
virtualCommands.jumpToControlledElement
Jump to an element controlled by the current element in the Virtual Screen Reader focus. See aria-controls
.
When using with virtual.perform()
, pass an index
option to select which controlled element is jumped to when there are more than one:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to jump to the second controlled element.
await virtual.perform(virtual.commands.jumpToControlledElement, { index: 1 });
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.jumpToDetailsElement
Jump to an element that describes the current element in the Virtual Screen Reader focus. See aria-details
.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to jump to the details element.
await virtual.perform(virtual.commands.jumpToDetailsElement);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.jumpToErrorMessageElement
Jump to an element that provides an error message for the current element in the Virtual Screen Reader focus. See aria-errormessage
.
When using with virtual.perform()
, pass an index
option to select which error message element is jumped to when there are more than one:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to jump to the second error message element.
await virtual.perform(virtual.commands.jumpToErrorMessageElement, {
index: 1,
});
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextAlternateReadingOrderElement
Move to the next element in an alternate reading order. See aria-flowto
.
When using with virtual.perform()
, pass an index
option to select which alternate reading order element is jumped to when there are more than one:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the second choice element of next alternate reading order.
await virtual.perform(
virtual.commands.moveToNextAlternateReadingOrderElement,
{ index: 1 }
);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousAlternateReadingOrderElement
Move to the previous element in an alternate reading order. See aria-flowto
.
When using with virtual.perform()
, pass an index
option to select which alternate reading order element is jumped to when there are more than one:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the second choice element of previous alternate reading order.
await virtual.perform(
virtual.commands.moveToPreviousAlternateReadingOrderElement,
{ index: 1 }
);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextBanner
Move to the next element with a banner
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next banner element.
await virtual.perform(virtual.commands.moveToNextBanner);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousBanner
Move to the previous element with a banner
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous banner element.
await virtual.perform(virtual.commands.moveToPreviousBanner);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextComplementary
Move to the next element with a complementary
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next complementary element.
await virtual.perform(virtual.commands.moveToNextComplementary);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousComplementary
Move to the previous element with a complementary
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous complementary element.
await virtual.perform(virtual.commands.moveToPreviousComplementary);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextContentinfo
Move to the next element with a contentinfo
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next contentinfo element.
await virtual.perform(virtual.commands.moveToNextContentinfo);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousContentinfo
Move to the previous element with a contentinfo
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous contentinfo element.
await virtual.perform(virtual.commands.moveToPreviousContentinfo);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextFigure
Move to the next element with a figure
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next figure element.
await virtual.perform(virtual.commands.moveToNextFigure);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousFigure
Move to the previous element with a figure
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous figure element.
await virtual.perform(virtual.commands.moveToPreviousFigure);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextForm
Move to the next element with a form
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next form element.
await virtual.perform(virtual.commands.moveToNextForm);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousForm
Move to the previous element with a form
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous form element.
await virtual.perform(virtual.commands.moveToPreviousForm);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeading
Move to the next element with a heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next heading element.
await virtual.perform(virtual.commands.moveToNextHeading);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeading
Move to the previous element with a heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous heading element.
await virtual.perform(virtual.commands.moveToPreviousHeading);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel1
Move to the next element with a level 1 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 1 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel1);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel1
Move to the previous element with a level 1 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 1 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel1);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel2
Move to the next element with a level 2 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 2 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel2);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel2
Move to the previous element with a level 2 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 2 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel2);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel3
Move to the next element with a level 3 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 3 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel3);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel3
Move to the previous element with a level 3 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 3 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel3);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel4
Move to the next element with a level 4 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 4 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel4);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel4
Move to the previous element with a level 4 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 4 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel4);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel5
Move to the next element with a level 5 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 5 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel5);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel5
Move to the previous element with a level 5 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 5 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel5);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextHeadingLevel6
Move to the next element with a level 6 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next level 6 heading element.
await virtual.perform(virtual.commands.moveToNextHeadingLevel6);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousHeadingLevel6
Move to the previous element with a level 6 heading
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous level 6 heading element.
await virtual.perform(virtual.commands.moveToPreviousHeadingLevel6);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextLink
Move to the next element with a [link
] role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next link element.
await virtual.perform(virtual.commands.moveToNextLink);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousLink
Move to the previous element with a [link
] role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous link element.
await virtual.perform(virtual.commands.moveToPreviousLink);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextMain
Move to the next element with a main
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next main element.
await virtual.perform(virtual.commands.moveToNextMain);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousMain
Move to the previous element with a main
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous main element.
await virtual.perform(virtual.commands.moveToPreviousMain);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextNavigation
Move to the next element with a navigation
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next navigation element.
await virtual.perform(virtual.commands.moveToNextNavigation);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousNavigation
Move to the previous element with a navigation
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous navigation element.
await virtual.perform(virtual.commands.moveToPreviousNavigation);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextRegion
Move to the next element with a region
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next region element.
await virtual.perform(virtual.commands.moveToNextRegion);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousRegion
Move to the previous element with a region
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous region element.
await virtual.perform(virtual.commands.moveToPreviousRegion);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextSearch
Move to the next element with a search
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next search element.
await virtual.perform(virtual.commands.moveToNextSearch);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousSearch
Move to the previous element with a search
role.
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous search element.
await virtual.perform(virtual.commands.moveToPreviousSearch);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToNextLandmark
Move to the next element with any landmark
role:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the next landmark element.
await virtual.perform(virtual.commands.moveToNextLandmark);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string
virtualCommands.moveToPreviousLandmark
Move to the previous element with any landmark
role:
import { virtual } from "@guidepup/virtual-screen-reader";
test("example test", async () => {
// Start the Virtual Screen Reader.
await virtual.start({ container: document.body });
// Perform action to move to the previous landmark element.
await virtual.perform(virtual.commands.moveToPreviousLandmark);
// Stop the Virtual Screen Reader.
await virtual.stop();
});
Type: string