Skip to content

internalSpeechTitles for SVG output doesn't seem to work #3192

Open
@nedredmond

Description

@nedredmond

Issue Summary

internalSpeechTitles, which defaults to true, is an SVG output option that promises SRE-generated speech in the title attribute. See the docs.

However, no speech appears in the DOM.

It appears to be invoked here. The handler then makes the following check:

    const speech = (attributes.get('aria-label') || attributes.get('data-semantic-speech')) as string;
    if (speech) {
        ...

If I'm understanding that right, it will only add speech if there is already an aria-label attribute present? There isn't one by default, so how do I add it to get this benefit?

At present, everything is aria-hidden, which isn't ideal. For our use case, we need to extract the svg from its HTML wrappers to nest it in another svg, so the hidden MathML is useless to us.

Steps to Reproduce:

Look at the TeX-to-SVG demo. The setting is on by default, yet there is no generated speech on any DOM element.

Technical details:

  • MathJax Version: 3.2
  • Client OS: Mac OS X 13.6.1
  • Browser: (e.g., Chrome 121.0.6167.184)

We are creating a custom component, but it doesn't appear in the default configuration either per the demo, which should have internalSpeechTitles set to true.

Supporting information:

Linked in the description above. Per the code, there should be generated speech, but only if the element already has an aria-label-- see the default output in the demo page. How can we make this automatic speech work as described?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code ExampleContains an illustrative code example, solution, or work-aroundv3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions