зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1396267 - Check that owner has content before aria-owns relocation. r=surkov
This commit is contained in:
Родитель
c808773f55
Коммит
1f0f0ebd6c
|
@ -809,7 +809,8 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
|||
|
||||
// Process relocation list.
|
||||
for (uint32_t idx = 0; idx < mRelocations.Length(); idx++) {
|
||||
if (mRelocations[idx]->IsInDocument()) {
|
||||
// owner should be in a document and have na associated DOM node (docs sometimes don't)
|
||||
if (mRelocations[idx]->IsInDocument() && mRelocations[idx]->HasOwnContent()) {
|
||||
mDocument->DoARIAOwnsRelocation(mRelocations[idx]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,3 +147,22 @@ addAccessibleTask(`
|
|||
testChildrenIds(two, ["a", "b"]);
|
||||
}
|
||||
);
|
||||
|
||||
addAccessibleTask(`<div id="a"></div><div id="b"></div>`,
|
||||
async function(browser, accDoc) {
|
||||
testChildrenIds(accDoc, ["a", "b"]);
|
||||
|
||||
let waitFor = {
|
||||
expected: [[ EVENT_REORDER, e => e.accessible == accDoc ]]
|
||||
};
|
||||
|
||||
await contentSpawnMutation(browser, waitFor, function() {
|
||||
document.documentElement.style.display = "none";
|
||||
document.documentElement.getBoundingClientRect();
|
||||
document.body.setAttribute("aria-owns", "b a");
|
||||
document.documentElement.remove();
|
||||
});
|
||||
|
||||
testChildrenIds(accDoc, []);
|
||||
}
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче