Bug 1264526 - process ARIA owns relocations for in-the-document accessibles only, r=yzen

This commit is contained in:
Alexander Surkov 2016-04-14 13:45:16 -04:00
Родитель 2f632d2f46
Коммит 79ec4018bb
2 изменённых файлов: 30 добавлений и 3 удалений

Просмотреть файл

@ -390,8 +390,10 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
// Process relocation list.
for (uint32_t idx = 0; idx < mRelocations.Length(); idx++) {
if (mRelocations[idx]->IsInDocument()) {
mDocument->DoARIAOwnsRelocation(mRelocations[idx]);
}
}
mRelocations.Clear();
// If a generic notification occurs after this point then we may be allowed to

Просмотреть файл

@ -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>