nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.08k stars 626 forks source link

NVDA does not announce math structure and role inside a contenteditable #16035

Open mitchellevan opened 8 months ago

mitchellevan commented 8 months ago

Steps to reproduce:

Before testing, installed MathPlayer 4 as mentioned in NVDA documentation. Do this even if instructions do not clearly say whether MathPlayer is needed for your browser (see #16036)

HTML <math> containing MathML

  1. Go to MathML Examples (Freedom Scientific)
  2. Use NVDA arrow keys to locate the "Quadratic Formula" math element. (Not inside an editor.)
  3. Go to MathML Examples in contenteditable (CodePen)
  4. Move focus into the editor.
  5. Use NVDA arrow keys to locate the "Quadratic Formula" math element inside the editor.

ARIA role="math"

  1. Go to Math inside a rich text editor - testing user agent support (CodePen)
  2. Use NVDA arrow keys to locate a math element not inside the editor.
  3. Under "Enter some text and math", move focus into the editor.
  4. Use NVDA arrow keys to locate the math element inside the editor.

Actual behavior:

HTML <math> containing MathML

Outside of a contenteditable, NVDA (with MathPlayer 4) announces an HTML MathML element as expected. Speech Viewer example (Firefox):

heading    level 2  Quadratic Formula
down arrow
  x  equals   the fraction with numerator   negative   b  plus or minus   the square root of   b  squared   minus   4       a      c     and denominator   2       a   

However, inside of a contenteditable, NVDA (with MathPlayer 4) announces the text of the HTML MathML element but not its structure, and does not announce the fact that it is a math element. Speech Viewer example (Firefox):

out of list  Edit some math:
down arrow
section  editable    heading    level 2  Area of a circle
enter
Edit some math:  section  editable  heading    level 2  Area of a circle
down arrow
  π
down arrow
heading    level 2  Quadratic Equation
down arrow
  x
down arrow
heading    level 2  Quadratic Formula
down arrow
  x
right arrow
equals
right arrow
equals
right arrow
dash
right arrow
dash
right arrow
b
right arrow
b
right arrow
plus or Minus
right arrow
plus or Minus
right arrow
b
right arrow
b
right arrow
right arrow
2
right arrow
right arrow
dash
right arrow
right arrow
4
right arrow
right arrow
right arrow
a
right arrow
right arrow
⁢
right arrow
⁢
right arrow
c
right arrow
c
right arrow
2
right arrow
2
right arrow
⁢
right arrow
⁢
right arrow
a
right arrow
a
right arrow
blank

The above problem is the same in Firefox and Chrome.

ARIA role="math"

In Firefox: NVDA has no problem with a role="math" element.

In Chrome:

Expected behavior:

Outside of a contenteditable NVDA should announce the math structure and content, and optionally the fact that it is a math element.

Inside of a contenteditable NVDA should announce the math structure and content, and the fact that it is a math element.

NVDA logs, crash dumps and other attachments:

not checked

System configuration

NVDA installed/portable/running from source:

NVDA downloaded from NVAccess.org and installed

NVDA version:

Version: 2023.2 (2023.2.0.29051)

Windows version:

Version 10.0.19045 Build 19045

Name and version of other software in use when reproducing the issue:

Chrome 120 Firefox 121.0.1

MathPlayer 4.0

Other information about your system:

none

Other questions

Does the issue still occur after restarting your computer?

yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

no

If NVDA add-ons are disabled, is your problem still occurring?

n/a

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

not attempted

mitchellevan commented 8 months ago

Similar bug in JAWS: https://github.com/FreedomScientific/standards-support/issues/799

mitchellevan commented 8 months ago

Chrome and Firefox both report MathML element semantics in devtools accessibility. That said...

If Chrome is partially responsible, please update Chrome Issue 1245715: JAWS not recognizing role=math element inside contentEditable

If Firefox is partially responsible, please file a bug for it.

Adriani90 commented 8 months ago

cc: @jcsteh