Poor screen reader experience when opening preferences and scrolling to element

In #41454 (closed) we added a patch to move the focus to the highlight region in about:preferences. This is used by:

  1. Security level panel's "Settings" button.
  2. The option to show the "Tor log".
  3. The language notification.

This does help position the focus, so if the user presses "Tab" they will move forward to the expected component. But the experience with screen readers is still not great. With Orca, whether it will announce the new position seemed to be intermittent. With NVDA it seems to be confused about where the user is in the document.

We're still waiting on a solution from upstream's bugzilla bug 1799153. Maybe using anchors, which screen readers know how to deal with.

Maybe we can come up with a temporary solution for our use cases whilst we await upstream for the general solution.