Open Bug 1796731 Opened 2 years ago

[CTW] Name is incorrect for initial aria-owns

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: Jamie, Unassigned)

References

Details

Test case:
data:text/html,<button id="button" aria-owns="owned"></button><div id="owned">test
With CTW, the button incorrectly has no name. Without CTW, the button has the correct name "test".
If you add aria-owns later, this works as expected:
data:text/html,<button id="button"></button><div id="owned">test</div><script>setTimeout(() => button.setAttribute('aria-owns', 'owned'), 500);</script>

Speculations (not yet verified):

  1. We process aria-owns async after we bind to the document.
  2. That means we process initial aria-owns after DoInitialUpdate, which is where the initial cache gets sent.
    • Perhaps we should delay the IPC tree and cache pushes until after ProcessRelocations. It seems wasteful to send a tree and then immediately send updates to move things. On the other hand, we probably fire tree mutation events as a result of ProcessRelocations, so we'd need to find a way of avoiding those for IPC, which sounds painful.
  3. I guess we're not firing a name change, which is weird; QueueMutationEvent calls PushNameOrDescriptionChange to deal with this.
  4. Setting aria-owns later works, which means that PushNameOrDescriptionChange call must be working. So I really don't follow why it's broken in 3).

I haven't seen anything in the wild that's broken by this... yet.

You need to log in before you can comment on or make changes to this bug.