Accessibility/MathML: Difference between revisions

Jump to navigation Jump to search
Added comparison to WebKit.
(Added list of potentially interesting attributes to expose.)
(Added comparison to WebKit.)
Line 751: Line 751:
* MATHML_STACK_CARRY
* MATHML_STACK_CARRY
* MATHML_STACK_LINE
* MATHML_STACK_LINE
==Comparison with WebKit==
There's a decent mapping between the proposed interface and how WebKit currently implements MathML accessibility.
As an example, the <msup> element will be used.
<pre>
<math>
  <msup>
    <mi>x</mi>
    <mn>2</mn>
  </msup>
</math>
</pre>
MathML elements are of AXRole AXGroup.  In order to determine the type of MathML element, the AXSubrole is checked.  The <msup> element has an AXSubrole of AXMathSubscriptSuperscript.
In order to determine the type of MathML element it is (<msup>, <msub>, or <msubsup>), there are the following three attributes that are added:
* AXMathBase
* AXMathSubscript
* AXMathSuperscript
These attributes point to the element fulfilling each particular role, and have a nil value otherwise.
In this case, since it's a superscript element, AXMathBase points to the <mi> and AXMathSuperscript points to the <mn>.  AXMathSubscript has a nil value.
On the <mi> and <mn> elements, no additional information regarding MathML structure is given, apart from knowing that the sub-roles are AXMathIdentifier and AXMathNumber respectively.
This is an advantage of the proposed interface, as it provides a way for child elements to know what part in their parent structure they are.
<mi> would know it's the base, and <mn> would know it's the superscript in this case.
With regards to mapping the proposed interface back to a WebKit compatible format, the existing AccessibleWrap and RoleMap can be modified so that the same interface is provided on OS X.
Additional information will also be available in the proposed interface (AXMathBaseOf or similar for the above example).
29

edits

Navigation menu