Closed Bug 1756728 Opened 3 years ago Closed 3 years ago

Allow a11y clients to query URL for cached remote documents

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

(Whiteboard: [ctw-m2])

Attachments

(3 files)

MsaaDocAccessible::get_accValue allows Windows clients to get the URL of a local document. While somewhat hacky, screen readers use this to keep state specific to a page; e.g. to preserve the cursor position across loads. We need to implement this for remote documents when the cache is enabled.

Rather than pushing the URL in the a11y cache, I think we should be able to use CanonicalBrowsingContext::GetCurrentURI. This isn't entirely straightforward because we can't currently get the BrowsingContext from a DocAccessibleParent for an in-process iframe, since DocAccessibleParents are associated with a BrowserParent and in-process iframes don't have their own BrowserParent. I think being able to get the BrowsingContext for a DocAccessibleParent could be useful for other things in future anyway.

I think we can deal with that by sending up the browsing context id when we construct the PDocAccessible. DocAccessibleParent can then use that to get the browsing context via BrowsingContext::Get.

Whiteboard: [ctw-m2]

Previously, even for remote in-process iframes, it was only possible to retrieve the top level BrowsingContext for the remote process by getting the managing BrowserParent.
This makes it possible to get the correct BrowsingContext even for in-process iframes.

Assignee: nobody → jteh
Status: NEW → ASSIGNED

The BrowsingContext already has this information, so we use that instead of redundantly caching it in RemoteAccessible.
This implementation works even when the a11y cache is disabled, so stop using the sync IPDL URL method.
We can't entirely unify the URL method because we don't have a base class for local/remote documents.
However, a method was added in nsAccUtils to unify this as much as possible.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/94aa863a913a part 1: Make it possible to retrieve a BrowsingContext from a DocAccessibleParent. r=morgan https://hg.mozilla.org/integration/autoland/rev/e4d32dca74a5 part 2: Support retrieving the URL for cached remote documents. r=morgan https://hg.mozilla.org/integration/autoland/rev/1202447f45d7 part 3: Remove now unused PDocAccessible::URL. r=morgan,ipc-reviewers,mccr8
Regressions: 1772045
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: