Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issues with firefox and safari. #1058

Merged
merged 12 commits into from
Apr 4, 2024
3 changes: 3 additions & 0 deletions ts/a11y/explorer/KeyExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export class SpeechExplorer extends AbstractExplorer<string> implements KeyExplo
* @override
*/
public FocusOut(_event: FocusEvent) {
// This guard is to FF and Safari, where focus in fires only once on
// keyboard.
if (!this.active) return;
this.generators.CleanUp(this.current);
if (!this.move) {
this.Stop();
Expand Down
6 changes: 6 additions & 0 deletions ts/a11y/explorer/Region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ export class SpeechRegion extends LiveRegion {
setTimeout(() => {
if (this.voiceRequest) {
resolve(true);
} else {
// This case is to make FF and Safari work.
setTimeout(() => {
this.voiceRequest = true;
resolve(true);
}, 100);
}
}, 100);
});
Expand Down