Bug 230986

Summary: AX: AXMathRootRadicand should return an array of elements, not just the first
Product: WebKit Reporter: James Craig <jcraig>
Component: AccessibilityAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dbarton, dmazzoni, ews-watchlist, fred.wang, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: data:text/html,<math><msqrt><mi>x</mi><mi>y</mi></msqrt></math>
Bug Depends on: 146452    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description James Craig 2021-09-29 14:30:21 PDT
Follow on from bug 146452 and https://github.com/w3c/mathml-aam/issues/4


"AXMathRootRadicand [should] return an array of elements. This would cover the root of any index and possible variants like the root of a complex number or even future tweaks to the spec." This change in WebKit will require a counterpart change in VoiceOver.

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)
Comment 1 Radar WebKit Bug Importer 2021-09-29 14:30:45 PDT
<rdar://problem/83688829>
Comment 2 Frédéric Wang (:fredw) 2021-10-06 02:01:59 PDT
I commented on https://github.com/w3c/mathml-aam/issues/4 ; but do you also plan to do the same for <mroot> (even if there is always one element for the radicand)? That is, would AXMathRootRadicand on

<mroot><mrow><mi>x</mi><mi>y</mi></mrow><mn>3</mn></mroot>

return an array with a single mrow element (rather than just the mrow element directly currently)?
Comment 3 Andres Gonzalez 2021-10-07 18:29:33 PDT
Created attachment 440564 [details]
Patch
Comment 4 Andres Gonzalez 2021-10-07 18:32:11 PDT
(In reply to Frédéric Wang (:fredw) from comment #2)
> I commented on https://github.com/w3c/mathml-aam/issues/4 ; but do you also
> plan to do the same for <mroot> (even if there is always one element for the
> radicand)? That is, would AXMathRootRadicand on
> 
> <mroot><mrow><mi>x</mi><mi>y</mi></mrow><mn>3</mn></mroot>
> 
> return an array with a single mrow element (rather than just the mrow
> element directly currently)?

That is correct. This patch makes the change to return an array of AX objects. If the radicand consists of just one element, the array will contain a single element.
Comment 5 Andres Gonzalez 2021-10-08 07:28:21 PDT
Created attachment 440605 [details]
Patch

Fix for build in platforms != mac
Comment 6 EWS 2021-10-08 11:40:20 PDT
Committed r283815 (242707@main): <https://commits.webkit.org/242707@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440605 [details].