Thanks Daniel. Looking narrowly at what my changes actually did that could have caused this, my best guess is that we're dealing with a timing issue of some sort having to do with accessible recreation. I was getting timeouts (with useful error messages) when running the patch through Try, though I ended up fixing those by rewriting the problematic tests as browser tests. The changes I made cause recreation of accessibles if an anchor element gains/loses an href (in the absence of a click listener), or gains/loses a click listener (in the absence of an href). If we have neither, the spec requires us to treat those accessibles as generics, so we recreate them as HyperTextAccessibles. The timing issues that I was seeing on Try before landing my initial patch appeared to be related to markup of the form `<a onclick=""></a>`. I fixed the issues by adding an href attribute to those tags in the test so that the accessible wouldn't be recreated (the href would force it to be a link from the beginning), and rewriting the pieces of the test that expected no href as a browser test, operating under the theory that the "onclick" attribute was being processed later and forcing recreation of the accessible. The browser tests didn't have any problem with that, and Try was happy. This is all to say: I don't know what about this confluence of factors causes these mystery failures and I certainly don't understand what the error is now, but my leading suspect is - *waves hands vaguely* - something to do with accessible recreation, and I think the way forward is to rewrite test_link.html as a browser test, which I'm working on now.
Bug 1845221 Comment 28 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Thanks Daniel. Looking narrowly at what my changes actually did that could have caused this, my best guess is that we're dealing with a timing issue of some sort having to do with accessible recreation. I was getting timeouts (with useful error messages) when running the patch through Try, though I ended up fixing those by rewriting the problematic tests as browser tests. The changes I made cause recreation of accessibles if an anchor element gains/loses an href (in the absence of a click listener), or gains/loses a click listener (in the absence of an href). If we have neither, the spec requires us to treat those accessibles as generics, so we recreate them as HyperTextAccessibles. The timing issues that I was seeing on Try before landing my initial patch appeared to be related to markup of the form `<a onclick=""></a>`. I fixed the issues by adding an href attribute to those anchor elements in the test so that the accessible wouldn't be recreated (the href would force it to be a link from the beginning), and rewriting the pieces of the test that expected no href as a browser test, operating under the theory that the "onclick" attribute was being processed later and forcing recreation of the accessible. The browser tests didn't have any problem with that, and Try was happy. This is all to say: I don't know what about this confluence of factors causes these mystery failures and I certainly don't understand what the error is now, but my leading suspect is - *waves hands vaguely* - something to do with accessible recreation, and I think the way forward is to rewrite test_link.html as a browser test, which I'm working on now.