|
|
| Line 544: |
Line 544: |
| =Interface= | | =Interface= |
|
| |
|
| ==nsIAccessibleMathML== | | ==MathMLAccessible== |
| Inherit from nsISupports. | | Inherit from HyperTextAccessibleWrap. |
| | |
| | * NativeAttributes - Override Accessible, and append MathML specific attributes if the element accepts them. |
| | * RelationByType - Override Accessible, process MathML specific relations. |
| | |
| | Attributes of interest might include the following: |
|
| |
|
| <pre>
| | * accent - Boolean value determining if the operator is an accent over the content. |
| readonly attribute AString tokenValue;
| | * accentunder - Boolean value determining if the operator is an accent under the content. |
| // Get token value for token MathML elements (mi, mo, mn, mtext, mspace, ms,
| | * actiontype - String value specifying what an maction should do. |
| // mglyph). Returns empty string if not a token element.
| | * align - String value specifying the type of alignment to be used for an mtable, munder, mover, munderover, or mstack. May be useful for determining logical ordering of an equation. |
| </pre>
| | * bevelled - Boolean value determining rendering format of the fraction. May be useful for word choice (e.g. "one over two" vs. "one divided by two"). |
| | * close - String value for the closing delimiter of an mfenced element. |
| | * columnlines - String value for the type of line between table columns. May be useful for determining table purpose. |
| | * crossout - String value specifying the type of crossout to be used in an mscarry, changing the crossout's meaning. |
| | * dir - String value (ltr, rtl) specifying text direction of the content. |
| | * fence - Boolean value specifying whether an mo is a fence element. |
| | * href - String value for hyperlinking to a URI. |
| | * largeop - Boolean value for determining if an mo should be drawn larger. May be useful in determining semantics. |
| | * linethickness - String or length value determining thickness of an mfrac line. May be useful in determining fraction's purpose (e.g. displaying binomial coefficients for a linethickness of 0). |
| | * location - String (cardinal direction) value determining location of an mscarry relative to its anchoring element. May be useful in determining the carry's purpose. |
| | * longdivstyle - String value controlling the appearance of an mlongdiv. May be useful in determining its usage. |
| | * mathvariant - String value specifying the logical class of a token element. May be useful in determining a token's usage. |
| | * notation - String value specifying the style to apply to the contents of an menclose. |
| | * open - String value for the opening delimiter of an mfenced element. |
| | * position - Integer value for mstack and mlongdiv child elements determining horizontal positioning. |
| | * rowlines - String value for the type of line between table rows. |
| | * selection - Integer value for determining which child element of an maction is to be used. |
| | * separator - Boolean value specifying whether an mo is a separator. |
| | * separators - String value containing separator values for an mfenced element. |
| | * shift - Integer value for mstack and mlongdiv child elements determining vertical positioning. |
| | * stretchy - Boolean value determining if an mo stretches to its adjacent elements' size. May be useful in determining operator usage. |
|
| |
|
| There's several different options for describing relations between MathML elements:
| | MathML attributes will be added to/from this tentative list to be displayed under the accessible object attributes based on their usefulness to ATs. |
|
| |
|
| 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.
| | Relations will link accessibles based on role. An example would be for a fraction structure, as follows. |
|
| |
|
| <pre> | | <pre> |
| Line 566: |
Line 591: |
| </pre> | | </pre> |
|
| |
|
| mfrac would have RELATION_NUMERATOR -> mi and RELATION_DENOMINATOR -> mn or similar. | | mfrac would have RELATION_NUMERATOR -> mi and RELATION_DENOMINATOR -> mn. |
| mi would have RELATION_NUMERATOR_OF -> mfrac and mn would have RELATION_DENOMINATOR_OF -> mfrac. | | mi would have RELATION_NUMERATOR_OF -> mfrac and mn would have RELATION_DENOMINATOR_OF -> mfrac. |
|
| |
|
| A list of potential relations is as follows: | | A list of relations is as follows: |
|
| |
|
| * MATHML_NUMERATOR_OF | | * MATHML_NUMERATOR_OF |
| Line 600: |
Line 625: |
| * MATHML_IN_ROW | | * MATHML_IN_ROW |
|
| |
|
| Option 2: Explicit readonly attributes (accessors) for going from parent elements to children and vice versa. e.g.
| | ==MathMLTableAccessible, MathMLTableRowAccessible, and MathMLTableCellAccessible== |
| <pre>
| | Inherit from HTMLTableAccessible, HTMLTableRowAccessible, and HTMLTableCellAccessible respectively. |
| 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.
| |
| Note that specialised elements such as mrow or mmultiscripts would return arrays of elements.
| |
| | |
| ==nsIAccessibleMathMLTable== | |
| Inherit from nsISupports.
| |
| | |
| <pre>
| |
| /**
| |
| * Return columns count in the table.
| |
| */
| |
| readonly attribute long columnCount;
| |
| | |
| /**
| |
| * Return rows count in the table.
| |
| */
| |
| readonly attribute long rowCount;
| |
| | |
| /**
| |
| * Return the MathML accessible object at the given row and column in the
| |
| * table.
| |
| *
| |
| * @param rowIndex [in] the row index to retrieve the cell at
| |
| * @param columnIndex [in] the column index to retrieve the cell at
| |
| */
| |
| nsIAccessibleMathML getCellAt(in long rowIndex, in long columnIndex);
| |
| | |
| /**
| |
| * Return the number of columns occupied by the MathML accessible cell at
| |
| * the specified row and column in the table. The result differs from 1 if
| |
| * the specified cell spans multiple columns.
| |
| *
| |
| * @param row [in] row index of the cell to return the column extent for
| |
| * @param column [in] column index of the cell to return the column extent
| |
| * for
| |
| */
| |
| long getColumnExtentAt(in long row, in long column);
| |
| | |
| /**
| |
| * Return the number of rows occupied by the MathML accessible cell at the
| |
| * specified row and column in the table. The result differs from 1 if the
| |
| * specified cell spans multiple rows.
| |
| *
| |
| * @param row [in] row index of the cell to return the column extent for
| |
| * @param column [in] column index of the cell to return the column extent
| |
| * for
| |
| */
| |
| long getRowExtentAt(in long row, in long column);
| |
| | |
| /**
| |
| * Return the label MathML accessible of the specified row in the table if
| |
| * available (mlabeledtr), or nullptr otherwise.
| |
| *
| |
| * @param rowIndex [in] the row index to retrieve label mtd for
| |
| */
| |
| nsIAccessibleMathML getRowLabel(in long rowIndex);
| |
| </pre>
| |
| | |
| ==nsIAccessibleMathMLTableCell==
| |
| Inherit from nsISupports. | |
| | |
| <pre>
| |
| /**
| |
| * Return container MathML table accessible.
| |
| */
| |
| readonly attribute nsIAccessibleMathMLTable table;
| |
| | |
| /**
| |
| * Return column index of this cell.
| |
| */
| |
| readonly attribute long columnIndex;
| |
| | |
| /**
| |
| * Return row index of this cell.
| |
| */
| |
| readonly attribute long rowIndex;
| |
| | |
| /**
| |
| * Return the number of columns occupied by this cell. The result differs
| |
| * from 1 if the specified cell spans multiple columns.
| |
| */
| |
| readonly attribute long columnExtent;
| |
| | |
| /**
| |
| * Return the number of rows occupied by this accessible cell. The result
| |
| * differs from 1 if the specified cell spans multiple rows.
| |
| */
| |
| readonly attribute long rowExtent;
| |
| </pre>
| |
| | |
| ==MathMLAccessible==
| |
| Inherit from AccessibleWrap, and implements nsIAccessibleMathML.
| |
| | |
| * 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. (Gets?)
| |
| * GetIsToken - Returns true if element is a token element.
| |
| | |
| Attributes of interest might include the following:
| |
|
| |
|
| * accent - Boolean value determining if the operator is an accent over the content.
| | Override NativeAttributes and RelationByType as with MathMLAccessible. |
| * accentunder - Boolean value determining if the operator is an accent under the content.
| | The table elements can be traversed using the same interface as HTMLTableAccessible (nsIAccessibleTable and nsIAccessibleTableCell). |
| * actiontype - String value specifying what an maction should do.
| |
| * align - String value specifying the type of alignment to be used for an mtable, munder, mover, munderover, or mstack. May be useful for determining logical ordering of an equation.
| |
| * bevelled - Boolean value determining rendering format of the fraction. May be useful for word choice (e.g. "one over two" vs. "one divided by two").
| |
| * close - String value for the closing delimiter of an mfenced element.
| |
| * columnlines - String value for the type of line between table columns. May be useful for determining table purpose.
| |
| * crossout - String value specifying the type of crossout to be used in an mscarry, changing the crossout's meaning.
| |
| * dir - String value (ltr, rtl) specifying text direction of the content.
| |
| * fence - Boolean value specifying whether an mo is a fence element.
| |
| * href - String value for hyperlinking to a URI.
| |
| * largeop - Boolean value for determining if an mo should be drawn larger. May be useful in determining semantics.
| |
| * linethickness - String or length value determining thickness of an mfrac line. May be useful in determining fraction's purpose (e.g. displaying binomial coefficients for a linethickness of 0).
| |
| * location - String (cardinal direction) value determining location of an mscarry relative to its anchoring element. May be useful in determining the carry's purpose.
| |
| * longdivstyle - String value controlling the appearance of an mlongdiv. May be useful in determining its usage.
| |
| * mathvariant - String value specifying the logical class of a token element. May be useful in determining a token's usage.
| |
| * notation - String value specifying the style to apply to the contents of an menclose.
| |
| * open - String value for the opening delimiter of an mfenced element.
| |
| * position - Integer value for mstack and mlongdiv child elements determining horizontal positioning.
| |
| * rowlines - String value for the type of line between table rows.
| |
| * selection - Integer value for determining which child element of an maction is to be used.
| |
| * separator - Boolean value specifying whether an mo is a separator.
| |
| * separators - String value containing separator values for an mfenced element.
| |
| * shift - Integer value for mstack and mlongdiv child elements determining vertical positioning.
| |
| * stretchy - Boolean value determining if an mo stretches to its adjacent elements' size. May be useful in determining operator usage.
| |
| | |
| MathML attributes will be added to/from this tentative list to be displayed under the accessible object attributes based on their usefulness to ATs.
| |
|
| |
|
| ==Roles== | | ==Roles== |