@guidepup/virtual-screen-reader
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -84,3 +84,3 @@ import { CommandOptions, ScreenReader } from "@guidepup/guidepup"; | ||
* ```ts | ||
* await keyboard.press("Control+f"); | ||
* await virtual.press("Control+f"); | ||
* ``` | ||
@@ -87,0 +87,0 @@ * |
@@ -131,2 +131,8 @@ "use strict"; | ||
} | ||
#focusActiveElement() { | ||
if (!this.#activeNode || !(0, isElement_1.isElement)(this.#activeNode.node)) { | ||
return; | ||
} | ||
this.#activeNode.node.focus(); | ||
} | ||
#updateState(accessibilityNode, ignoreIfNoChange = false) { | ||
@@ -292,3 +298,3 @@ const spokenPhrase = (0, getSpokenPhrase_1.getSpokenPhrase)(accessibilityNode); | ||
* ```ts | ||
* await keyboard.press("Control+f"); | ||
* await virtual.press("Control+f"); | ||
* ``` | ||
@@ -321,3 +327,3 @@ * | ||
].join(""); | ||
await this.click(); | ||
this.#focusActiveElement(); | ||
await user_event_1.default.keyboard(keyboardCommand, defaultUserEventOptions); | ||
@@ -324,0 +330,0 @@ await this.#refreshState(true); |
{ | ||
"name": "@guidepup/virtual-screen-reader", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Virtual screen reader driver for unit test automation.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
73299
1750