Skip to content

Commit 7486f28

Browse files
committed
incorporate review suggestions
1 parent 3bba375 commit 7486f28

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

ts/a11y/explorer/KeyExplorer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ export class SpeechExplorer
13111311
return node;
13121312
}
13131313
}
1314-
return null;
1314+
return node.querySelector(nav) as HTMLElement;
13151315
}
13161316

13171317
/**
@@ -1351,10 +1351,10 @@ export class SpeechExplorer
13511351
?.split(/ /);
13521352
if (!owns) return null;
13531353
let i = owns.indexOf(this.nodeId(node));
1354-
let next = this.getNode(owns[++i]);
1355-
while (next && !next.hasAttribute('data-speech-node')) {
1354+
let next;
1355+
do {
13561356
next = this.getNode(owns[++i]);
1357-
}
1357+
} while (next && !next.hasAttribute('data-speech-node'));
13581358
return next;
13591359
}
13601360

@@ -1372,10 +1372,10 @@ export class SpeechExplorer
13721372
?.split(/ /);
13731373
if (!owns) return null;
13741374
let i = owns.indexOf(this.nodeId(node));
1375-
let prev = this.getNode(owns[--i]);
1376-
while (prev && !prev.hasAttribute('data-speech-node')) {
1375+
let prev;
1376+
do {
13771377
prev = this.getNode(owns[--i]);
1378-
}
1378+
} while (prev && !prev.hasAttribute('data-speech-node'));
13791379
return prev;
13801380
}
13811381

0 commit comments

Comments
 (0)