function doTest() {
// First, we focus something just before the flex container:
document.getElementById('beforeContainer').focus();
is(document.activeElement, document.getElementById('beforeContainer'), "explicitly-focused link should gain focus");
// And then we advance focus across the focusable things in the flex container
// and check that we traverse them in the expected order:
for (let expectedId of gExpectedFocusedIds) {
synthesizeKey("KEY_Tab");
is(document.activeElement, document.getElementById(expectedId), "expecting element '#" + expectedId + "' to be focused");
}
SimpleTest.finish();
}
// Before we start, we have to bump Mac to make its 'tab'-key focus behavior
// predicatble:
function begin() {
SpecialPowers.pushPrefEnv({ set: [[ "accessibility.tabfocus", 7 ]] }, doTest);
}
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.