Bug 230986 - AX: AXMathRootRadicand should return an array of elements, not just the first
Summary: AX: AXMathRootRadicand should return an array of elements, not just the first
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL: data:text/html,<math><msqrt><mi>x</mi...
Keywords: InRadar
Depends on: 146452
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-29 14:30 PDT by James Craig
Modified: 2021-10-08 11:40 PDT (History)
11 users (show)

See Also:


Attachments
Patch (25.26 KB, patch)
2021-10-07 18:29 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (26.10 KB, patch)
2021-10-08 07:28 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].