diff --git a/ts/a11y/semantic-enrich.ts b/ts/a11y/semantic-enrich.ts index 52565892a..692679335 100644 --- a/ts/a11y/semantic-enrich.ts +++ b/ts/a11y/semantic-enrich.ts @@ -131,10 +131,11 @@ export function EnrichedMathItemMixin) { + public attachSpeech(document: MathDocument) { if (this.state() >= STATE.ATTACHSPEECH) return; - const attributes =this.root.attributes; - const speech = (attributes.get('aria-label') || attributes.get('data-semantic-speech')) as string; + const attributes = this.root.attributes; + const speech = (attributes.get('aria-label') || + this.getSpeech(this.root)) as string; if (speech) { const adaptor = document.adaptor; const node = this.typesetRoot; @@ -146,6 +147,26 @@ export function EnrichedMathItemMixin