Bug 146452 - AX: VoiceOver does not correctly read square root with 2 children or more
Summary: AX: VoiceOver does not correctly read square root with 2 children or more
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 146578
  Show dependency treegraph
 
Reported: 2015-06-30 03:39 PDT by Frédéric Wang (:fredw)
Modified: 2016-04-01 08:44 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2015-06-30 03:39:55 PDT
Testcase:
data:text/html,<math><msqrt><mi>x</mi><mi>y</mi></msqrt></math>

Accessible tree exposed by Safari:
Role: AXGroup
Subrole: AXMathSquareRoot
MathRootRadicand: pointer to child "x"
accessibilityChildren: 3 items
  0 AXStaticText (radical symbol)
  1 AXMathIdentifier (x)
  2 AXMathIdentifier (y)

Accessible tree exposed by Firefox Nightly:
Role: AXGroup
Subrole: AXMathSquareRoot
MathRootRadicand: pointer to child "x"
accessibilityChildren: 2 items
  0 AXMathIdentifier (x)
  1 AXMathIdentifier (y)

Actual Result:
In both cases, VoiceOver reads "square root of x".

Expect Result:
VoiceOver should read "square root of xy".

It seems that VoiceOver uses the MathRootRadicand attribute in order to get the accessible child of AXMathSquareRoot to read but ignores the other siblings. Instead, it should use this attribute to determine the first child to read and then read the next siblings. Alternatively, WebKit could do as Firefox and only expose the relevant children (i.e. not the AXStaticText with the radical symbol). Then the MathRootRadicand attribute will no longer be necessary for AXMathSquareRoot and VoiceOver could just read the children of AXMathSquareRoot.

Note 1: <msqrt> can have any number of children while <mroot> always has two children (base, index). So while using MathRootRadicand / MathRootIndex attributes works well for AXMathRoot, this does not for AXMathSquareRoot.

Note 2: The equivalent markup with an explicit <mrow> is correclty read: <math><msqrt><mrow><mi>x</mi><mi>y</mi></mrow></msqrt></math>.
Comment 1 Radar WebKit Bug Importer 2015-06-30 03:40:15 PDT
<rdar://problem/21608794>
Comment 2 Frédéric Wang (:fredw) 2015-07-01 00:54:45 PDT
This bug appears in test 13 of the MathML torture test:

https://mdn.mozillademos.org/en-US/docs/Mozilla/MathML_Project/MathML_Torture_Test$samples/MathML_Torture_Test