/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** *Ensureframeswithzeroareahavetheirx,ycoordinatescorrectlyreported *inbounds()
*/
addAccessibleTask(
`
<br>
<div id="a" style="height:0; width:0;"></div>
`,
async function (browser, accDoc) { const a = findAccessibleChildByID(accDoc, "a");
await testContentBounds(browser, a, 0, 0);
}
);
/** *Ensureaccessibleshaveaccuratelysigneddimensionsandpositionwhen *offscreen.
*/
addAccessibleTask(
`
<input type="radio" id="radio" style="left: -671091em; position: absolute;">
`,
async function (browser, accDoc) { const radio = findAccessibleChildByID(accDoc, "radio"); const contentDPR = await getContentDPR(browser); const [x, y, width, height] = getBounds(radio, contentDPR); Assert.less(x, 0, "X coordinate should be negative"); Assert.greater(y, 0, "Y coordinate should be positive"); Assert.greater(width, 0, "Width should be positive"); Assert.greater(height, 0, "Height should be positive"); // Note: the exact values of x, y, width, and height // are inconsistent with the DOM element values of those // fields, so we don't check our bounds against them with // `testContentBounds` here. DOM reports a negative width, // positive height, and a slightly different (+/- 20) // x and y.
}
);
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.