зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264526 - process ARIA owns relocations for in-the-document accessibles only, r=yzen
This commit is contained in:
Родитель
2f632d2f46
Коммит
79ec4018bb
|
@ -390,7 +390,9 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
|||
|
||||
// Process relocation list.
|
||||
for (uint32_t idx = 0; idx < mRelocations.Length(); idx++) {
|
||||
mDocument->DoARIAOwnsRelocation(mRelocations[idx]);
|
||||
if (mRelocations[idx]->IsInDocument()) {
|
||||
mDocument->DoARIAOwnsRelocation(mRelocations[idx]);
|
||||
}
|
||||
}
|
||||
mRelocations.Clear();
|
||||
|
||||
|
|
|
@ -480,7 +480,6 @@
|
|||
|
||||
this.invoke = function removeNotARIAOwnedEl_invoke()
|
||||
{
|
||||
dumpTree(aContainer, "before");
|
||||
var tree = {
|
||||
SECTION: [
|
||||
{ TEXT_LEAF: [ ] },
|
||||
|
@ -494,7 +493,6 @@
|
|||
|
||||
this.finalCheck = function removeNotARIAOwnedEl_finalCheck()
|
||||
{
|
||||
dumpTree(aContainer, "after");
|
||||
var tree = {
|
||||
SECTION: [
|
||||
{ GROUPING: [ ] }
|
||||
|
@ -509,6 +507,25 @@
|
|||
}
|
||||
}
|
||||
|
||||
function setARIAOwnsOnElToRemove(aParent, aChild)
|
||||
{
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_HIDE, getAccessible(aParent))
|
||||
];
|
||||
|
||||
this.invoke = function setARIAOwnsOnElToRemove_invoke()
|
||||
{
|
||||
getNode(aChild).setAttribute("aria-owns", "no_id");
|
||||
getNode(aParent).removeChild(getNode(aChild));
|
||||
getNode(aParent).parentNode.removeChild(getNode(aParent));
|
||||
}
|
||||
|
||||
this.getID = function setARIAOwnsOnElToRemove_getID()
|
||||
{
|
||||
return `set ARIA owns on an element, and then remove it, and then remove its parent`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
@ -555,6 +572,8 @@
|
|||
|
||||
gQueue.push(new removeNotARIAOwnedEl("t6_container", "t6_span"));
|
||||
|
||||
gQueue.push(new setARIAOwnsOnElToRemove("t7_parent", "t7_child"));
|
||||
|
||||
gQueue.invoke(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
|
@ -607,6 +626,12 @@
|
|||
<span id="t6_span">hey</span>
|
||||
</div>
|
||||
<div id="t6_fake" role="group"></div>
|
||||
|
||||
<div id="t7_container">
|
||||
<div id="t7_parent">
|
||||
<div id="t7_child"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче