diff --git a/ts/a11y/explorer.ts b/ts/a11y/explorer.ts index ebfa30b68..95783d538 100644 --- a/ts/a11y/explorer.ts +++ b/ts/a11y/explorer.ts @@ -259,11 +259,10 @@ export function ExplorerMathItemMixin>( let focus = null; if (this.explorers) { const speech = this.explorers.speech; - focus = speech?.attached ? document.tmpFocus : null; - if (focus) { + if (speech?.attached) { + focus = document.tmpFocus; this.refocus = speech.semanticFocus() ?? null; - const adaptor = document.adaptor; - adaptor.append(adaptor.body(), focus); + this.typesetRoot.after(focus); } this.explorers.reattach(); focus?.focus(); @@ -535,10 +534,8 @@ export function ExplorerMathDocumentMixin< tabIndex: 0, style: { outline: 'none', - display: 'block', + display: 'inline-block', position: 'absolute', - top: 0, - left: '-10px', width: '1px', height: '1px', overflow: 'hidden', diff --git a/ts/a11y/explorer/KeyExplorer.ts b/ts/a11y/explorer/KeyExplorer.ts index eb34e58fe..defd6d327 100644 --- a/ts/a11y/explorer/KeyExplorer.ts +++ b/ts/a11y/explorer/KeyExplorer.ts @@ -383,6 +383,8 @@ export class SpeechExplorer if (!this.clicked) { this.Start(); this.backTab = event.target === this.img; + } else if (!this.focusSpeech) { + this.speak(''); // don't speak initial equation until click event } this.clicked = null; }