Skip to content

Commit 1a79bb1

Browse files
committed
Clicking per mouse event.
1 parent d492e26 commit 1a79bb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ts/a11y/explorer/KeyExplorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ export class SpeechExplorer extends AbstractKeyExplorer<string> {
304304

305305
/**
306306
* Programmatically triggers a link if the focused node contains one.
307+
* @param {number} code The keycode of the last key pressed.
307308
*/
308309
protected triggerLink(code: number) {
309310
if (code !== 13) {
@@ -314,8 +315,7 @@ export class SpeechExplorer extends AbstractKeyExplorer<string> {
314315
getAttribute('data-semantic-postfix')?.
315316
match(/(^| )link($| )/);
316317
if (focus) {
317-
// Works for CHTML only.
318-
node.parentElement.click();
318+
node.parentNode.dispatchEvent(new MouseEvent('click'));
319319
return true;
320320
}
321321
return false;

0 commit comments

Comments
 (0)