/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function testMathAttr(iface, attr, subrole, textLeafValue) {
ok(iface.attributeNames.includes(attr), `Object has ${attr} attribute`);
let value = iface.getAttributeValue(attr);
is(
value.getAttributeValue("AXSubrole"),
subrole,
`${attr} value has correct subrole`
);
if (textLeafValue) {
let children = value.getAttributeValue("AXChildren");
is(children.length, 1, `${attr} value has one child`);
is(
children[0].getAttributeValue("AXRole"), "AXStaticText",
`${attr} value's child is static text`
);
is(
children[0].getAttributeValue("AXValue"),
textLeafValue,
`${attr} value has correct text`
);
}
}
addAccessibleTask(
`<math id="math">
<msqrt id="sqrt">
<mn>2</mn>
</msqrt>
</math>`,
async (browser, accDoc) => {
let math = getNativeInterface(accDoc, "math");
is(
math.getAttributeValue("AXSubrole"), "AXDocumentMath", "Math element has correct subrole"
);
let sqrt = getNativeInterface(accDoc, "sqrt");
is(
sqrt.getAttributeValue("AXSubrole"), "AXMathSquareRoot", "msqrt has correct subrole"
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.