Bug 159364 - Can't read MathML tags with screen readers
Summary: Can't read MathML tags with screen readers
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.8.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks: Formula-Editor a11y-Windows
  Show dependency treegraph
 
Reported: 2024-01-24 17:03 UTC by mithat770619
Modified: 2024-04-15 02:20 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mithat770619 2024-01-24 17:03:29 UTC
We can navigate and read math ml tags with a screen reader in paid office editors, for example, the equation is voiced as 2 minus 3 equals minus one, but in libreoffice this is only voiced as an embedded object, we can understand its presence but not its content, the same problem applies when we try to write and read math formulas in libre office formula module.
Comment 1 V Stuart Foote 2024-01-24 22:27:16 UTC
Within the LibreOffice UI we don't directly manipulate MathML, rather each ODF formula is recorded with both the UI's StarMath 5.0 markup used, and a MathML 2.0 representation on file save to ODF as XML.

F10, F6, Tab and cursor (U,D,L,R) movements expose content of the Formula Editor's UI.

Though no support for sensibly sounding the StarMath 5.0 as entered in the "Commands Option Pane" multi-line paragraph edit panel. While all that sounds for the Elements panels are the list items and their tooltip description.

Not clear if the MathML can be directly exposed to the Assistive Technology of Screen Readers, which themselves would need filters to read the MathML in a non-HTML5 context.

Don't want to "Not Our Bug" this, but not clear we could do anything substantive.

@Michael, Regina?
Comment 2 mithat770619 2024-01-25 13:08:08 UTC
@V Stuart Foote v
Comment 3 Michael Weghorn 2024-01-26 22:47:25 UTC
(In reply to V Stuart Foote from comment #1)
> Not clear if the MathML can be directly exposed to the Assistive Technology
> of Screen Readers, which themselves would need filters to read the MathML in
> a non-HTML5 context.

A quick `git grep -i mathml` in NVDA's source code suggests that there's some specific handling for MathML for Word and other applications, e.g. [1] for Word.

One way to expose MathML to the a11y layer (if there's an easy way to get a MathML representation from within Math) might be to us an a11y object attribute, similar to what's done for formulae in Calc (e.g. a "Formula" object attribute with value "45+12" on a cell that contains such a formula).

(Object attributes are supported by at least IAccessible2 on Windows and AT-SPI on Linux, though currently only Gtk 3/ATK provides the API to expose custom attributes, s.a. discussion in tdf#158030 for more details and links to Gtk 4 issue and pending Qt Gerrit changes. Not sure about macOS, but from what I've seen so far, the API seems more strongly typed/less flexible there.)

[1] https://github.com/nvaccess/nvda/blob/e71916d0ff6fff3949507e625559b39f00f8f7ec/source/NVDAObjects/UIA/wordDocument.py#L148
Comment 4 Stéphane Guillou (stragu) 2024-03-08 14:13:58 UTC
Marking as "new" based on comment 3: I understand we could do something on our end?
Comment 5 Michael Weghorn 2024-03-13 12:23:48 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> Marking as "new" based on comment 3: I understand we could do something on
> our end?

Potentially yes, in a coordinated effort with NVDA/screen readers (needs agreement on a way that things are reported by LO and then consumed by screen readers).