Closed Bug 1128143 Opened 9 years ago Closed 9 years ago

Add ATK roles for MathML fractions, roots

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

New roles for MathML fraction, roots and scripts landed last week in WebKit/ATK/AT-SPI:

http://trac.webkit.org/changeset/179253
https://git.gnome.org/browse/atk/commit/?id=c7195e78c
https://git.gnome.org/browse/pyatspi2/commit/?id=c08fdaa099b8b0410d4dabf36325897bea73ba27

This bug is for adding them to Gecko.
Blocks: mathmla11y
Summary: Add ATK roles for MathML fractions, roots and scripts → Add ATK subroles for MathML fractions, roots and scripts
+ Expose mfrac as ATK_ROLE_MATH_FRACTION, and both mroot and msqrt as
+ ATK_ROLE_MATH_ROOT. In the case of script elements, expose the container
+ (msub, msup, msubsup, and mmultiscripts) using the generic text block role
+ ATK_ROLE_SECTION. Then expose the actual script child elements using role
+ ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT. In the case of mmultiscripts,
+ expose whether it is a prescript or postscript via AtkObject attribute.

Joanie: can you explain what is the plan here? Is it another interim solution until we have math subroles? (I don't remember whether we discussed that and that was not in your notes).
Flags: needinfo?(jdiggs)
Summary: Add ATK subroles for MathML fractions, roots and scripts → Add ATK roles for MathML fractions, roots and scripts
It became sadly apparent that the subroles would not happen in the immediate future. Therefore, this is indeed an interim solution. Or part of it, anyway.
Flags: needinfo?(jdiggs)
I'm removing the "scripts" part here as I don't think ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT will work for things like

<msup><mn>1</mn><mfrac><mn>2</mn><mn>3</mn></mfrac></msup>

Let's just handle fractions and roots for now.
Status: NEW → ASSIGNED
Summary: Add ATK roles for MathML fractions, roots and scripts → Add ATK roles for MathML fractions, roots
Attached patch Patch (obsolete) — Splinter Review
Attached patch PatchSplinter Review
Attachment #8574930 - Attachment is obsolete: true
Frederic, is it ready to land?
Comment on attachment 8575479 [details] [diff] [review]
Patch

OK, this and bug 1109022 can be taken now that bug 1001634 is merged. I checked that they apply and build correctly. However, I have some problem with accerciser right now, so could not check whether the ATK tree is correctly exposed...
Attachment #8575479 - Flags: review?(surkov.alexander)
Comment on attachment 8575479 [details] [diff] [review]
Patch

Review of attachment 8575479 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/atk/AccessibleWrap.cpp
@@ +712,5 @@
>    else if (aAtkObj->role == ATK_ROLE_STATIC && !IsAtkVersionAtLeast(2, 16))
>      aAtkObj->role = ATK_ROLE_TEXT;
> +  else if ((aAtkObj->role == ATK_ROLE_MATH_FRACTION ||
> +            aAtkObj->role == ATK_ROLE_MATH_ROOT) && !IsAtkVersionAtLeast(2, 16))
> +    aAtkObj->role = ATK_ROLE_UNKNOWN;

some generic role would be nicer but perhaps it doesn't really matter since no semantics anyway
Attachment #8575479 - Flags: review?(surkov.alexander) → review+
(In reply to alexander :surkov from comment #8)
> ::: accessible/atk/AccessibleWrap.cpp
> @@ +712,5 @@
> >    else if (aAtkObj->role == ATK_ROLE_STATIC && !IsAtkVersionAtLeast(2, 16))
> >      aAtkObj->role = ATK_ROLE_TEXT;
> > +  else if ((aAtkObj->role == ATK_ROLE_MATH_FRACTION ||
> > +            aAtkObj->role == ATK_ROLE_MATH_ROOT) && !IsAtkVersionAtLeast(2, 16))
> > +    aAtkObj->role = ATK_ROLE_UNKNOWN;
> 
> some generic role would be nicer but perhaps it doesn't really matter since
> no semantics anyway

Right. WebKit fallbacks to ATK_ROLE_UNKNOWN, so let's do that too.

http://trac.webkit.org/browser/trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp#L677
https://hg.mozilla.org/mozilla-central/rev/1b0004f24d3f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Blocks: 1175335
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: