29
edits
(Added MathML examples.) |
m (Reordered some text, added RelationByType override on MathMLAccessible.) |
||
| Line 470: | Line 470: | ||
</pre> | </pre> | ||
There's several different options for describing relations between MathML elements: | |||
Option 1 | Option 1: Relations linking accessibles based on role, so we won't have attributes/functions in the interface. An example would be for a fraction structure, as follows. | ||
<pre> | <pre> | ||
| Line 496: | Line 485: | ||
mfrac would have RELATION_NUMERATOR_IS -> mi and RELATION_DENOMINATOR_IS -> mn or similar. | mfrac would have RELATION_NUMERATOR_IS -> mi and RELATION_DENOMINATOR_IS -> mn or similar. | ||
mi would have RELATION_NUMERATOR_FOR -> mfrac and mn would have RELATION_DENOMINATOR_FOR -> mfrac. | mi would have RELATION_NUMERATOR_FOR -> mfrac and mn would have RELATION_DENOMINATOR_FOR -> mfrac. | ||
Option 2: Explicit readonly attributes (accessors) for going from parent elements to children and vice versa. e.g. | |||
<pre> | |||
readonly attribute nsIAccessibleMathML radicand; | |||
readonly attribute nsIAccessibleMathML rootIndex; | |||
readonly attribute nsIAccessibleMathML under; | |||
... | |||
readonly attribute nsIAccessibleMathML parent; | |||
</pre> | |||
Returns nullptr if the related accessible doesn't exist. | |||
==MathMLAccessible== | ==MathMLAccessible== | ||
| Line 501: | Line 501: | ||
* NativeAttributes - Override Accessible, and append MathML specific attributes if the element accepts them. | * NativeAttributes - Override Accessible, and append MathML specific attributes if the element accepts them. | ||
* RelationByType - Override Accessible, process MathML specific relations if we go that route. | |||
* GetTokenValue - Sets token value string if applicable. | * GetTokenValue - Sets token value string if applicable. | ||
* GetIsToken - Returns true if element is a token element. | * GetIsToken - Returns true if element is a token element. | ||
edits