Closed Bug 1455416 Opened 6 years ago Closed 1 year ago

removed accessible element doesn't return owned accessibles back

Categories

(Core :: Disability Access APIs, defect, P2)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox114 --- wontfix
firefox115 --- wontfix
firefox116 --- fixed

People

(Reporter: surkov, Assigned: nlapre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

example:

<body>
  <input id='i'>
  <div aria-owns='i'></div>
</body>

and then
div.remove();

expected: input accessible should be under a document
actual: input accessible is lost
it leads to broken trees, which is known to be a cause of all kind of problems ranging from stability to correctness
Blocks: ariaowns
Priority: -- → P2
Severity: normal → S3
Assignee: nobody → nlapre

Summary of Zoom chat:

  1. Things that should hold at this point:
    • IsRelocated() should be true on owned children.
    • The owner (parent) should be in mARIAOwnsHash.
    • We cannot assume that ContentRemoved runs inside WillRefresh. Even if it does, we can't guarantee it will run after the relocation list is processed. So, we can't rely on relocations to handle this.
  2. Probably need to do this somewhere in UncacheChildrenInSubtree.
  3. If a child IsRelocated(), put it back where it belongs; don't remove it. See PutChildrenBack... but that has to be called on the parent and it deals with multiple children,so that might make things interesting.
    • aria-owns can be used to reorder children without moving them across subtrees. We do want to remove the child in that case. So we might need to check whether the child has the same parent after "putting it back" and remove it if it does.

This revision modifies UncacheChildrenInSubtree such that removed but relocated
accessibles that are aria-owned are actually relocated to their proper parent
after the removal of the formerly-aria-owning parent. On the way to
accomplishing that goal, this revision adds PutChildBack, a method called by
PutChildrenBack and now also called by UncacheChildrenInSubtree. We don't always
want to put all the children back - this function lets us manage it one at a time.
Finally, this revision adds tests which verify that the functionality works
as intended.

Pushed by nlapre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/edbaacc4f3d6
Relocate aria-owned accessibles on (aria) parent removal, r=Jamie
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Regressions: 1832441
Regressions: 1832447
Regressions: 1832436
Regressions: 1832694
Regressions: 1832904
Regressions: 1832730
Regressions: 1832897
Backout by nerli@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/a26e51291aca
Backed out changeset edbaacc4f3d6 for ContentCache crashes a=backout
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 115 Branch → ---
Pushed by nlapre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dcb5003e4c19
Relocate aria-owned accessibles on (aria) parent removal, r=Jamie
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1837315
Blocks: 1772477
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: