Closed Bug 1798098 Opened 2 years ago Closed 2 years ago

Firefox hangs after Copy Phone Number with Win11 Suggested Actions enabled on large pages

Categories

(Core :: Disability Access APIs, defect)

Unspecified
Windows 11
defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
firefox-esr102 --- verified
firefox106 --- wontfix
firefox107 --- verified
firefox108 --- verified
firefox109 --- verified

People

(Reporter: nlapre, Assigned: Jamie)

References

Details

Attachments

(1 file)

Reproducible in Windows 11 version 22H2, 22621.675 or above. Suggested Actions must be on, which can be enabled via Windows Settings, System, Clipboard, turn the Suggested Actions toggle on (it should be on by default). Testable in Firefox 106 Release, but for most accurate testing I recommend using Firefox Nightly Build ID 20221028212211 (can verify in about:support).

STR:

  1. Open Nightly and go to about:config, setting the pref for accessibility.force_disabled to -1. Restart Nightly if it wasn't already -1.
  2. Navigate to a large page with a telref on it. At the time, I don't know of a good one, so I recommend injecting this telref (<a href="tel:+1 617 324 5555">Call us at +1 617 324 5555</a>) into an existing page. One way I've done this is to open up the WWI Wikipedia page, right click Inspect on the "World War I" heading, right click Edit as HTML on the span element highlighted in the dev tools Inspector pane, select all, paste in the telref referenced above, then click outside of the HTML edit box (but within the HTML code visualization) to confirm the change. "World War I" should have been replaced with a link saying "Call us at +1 617 314 5555".
  3. Right click on that "Call us" link and choose Copy Phone Number.

Expected results: Nightly copies the phone number and does not hang.
Actual results: After a brief moment, Nightly hangs / becomes unresponsive.

Note that this is only reproducible when all of the following conditions are met:

  1. User is on Win11 >= 22621.675
  2. User has a11y enabled already
  3. User encounters a tel: URI
  4. User is on a large document

If anyone knows of a good large document with a telref, do update this, since that would help make step 2 above a lot easier.

Note: This workaround is applicable to anyone encountering this bug.

The patches in bug 1774285 prevent Suggested Actions a11y tree walking in most cases.
However, when a11y is already enabled, we can still get into a tree walk that triggers a hang when using Copy Phone Number on a tel: link.
This is because there is no selected text in this case, so Suggested Actions falls back to walking the tree.
This patch prevents these walks by returning a 0 child count for documents and the focus within a timeout period after setting the clipboard.
We do this for parent process Accessibles in MsaaAccessible.
With the cache disabled, in-process Windows clients access content process Accessibles using COM proxies.
We hack the child count for those in AccessibleHandler, which wraps these COM proxies for in-process clients.
This means that Firefox needs to be installed in order for this to work, since AccessibleHandler can only be used with an installed copy.
A11y performance without the cache is very poor without AccessibleHandler anyway.
Because AccessibleHandler is an entirely separate dll, we need to duplicate the suppression logic in AccessibleHandlerControl, which can be accessed by both Gecko and AccessibleHandler.

Attachment #9301021 - Attachment description: Bug 1798098 WIP: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2. → Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d205950e7297 Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2. r=nlapre
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox107 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(jteh)

Comment on attachment 9301021 [details]
Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.

Beta/Release Uplift Approval Request

  • User impact if declined: Hangs for users with accessibility enabled when copying phone number links to the clipboard using the context menu with Suggested Actions enabled in Windows 11 22H2.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): There's a slight risk it may cause some problems for other tools which use accessibility APIs. There isn't really an alternative until Microsoft fixes Windows, though. My feeling is that the slight risk of regressions here is outweighed by the very nasty hangs without this fix.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(jteh)
Attachment #9301021 - Flags: approval-mozilla-beta?

Comment on attachment 9301021 [details]
Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.

107 is now in RC. Changing the beta uplift request to a release uplift request, for consideration as a ride-along.

Attachment #9301021 - Flags: approval-mozilla-beta? → approval-mozilla-release?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

I was able to reproduce it on Windows 11 PRO 22H2 (22621.755) using Nightly build 108.0a1(20221028212211) and the steps from description.
Verified as fixed on Win11 using Nightly build 109.0a1(20221116093106) and Beta 108.0b2(20221115200658).

Comment on attachment 9301021 [details]
Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.

Approved for 107.0.1

Attachment #9301021 - Flags: approval-mozilla-release? → approval-mozilla-release+

Verified as fixed on Win11 using Firefox build 107.0.1(20221128144904).

Please nominate this for ESR102 approval when you get a chance. It grafts cleanly.

Flags: needinfo?(jteh)

Comment on attachment 9301021 [details]
Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Hangs for users with accessibility enabled (which could include enterprise SSO tools, etc.).
  • User impact if declined: Hangs for users with accessibility enabled when copying phone number links to the clipboard using the context menu with Suggested Actions enabled in Windows 11 22H2.
  • Fix Landed on Version: 107
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): There's a slight risk it may cause some problems for other tools which use accessibility APIs. There isn't really an alternative until Microsoft fixes Windows, though. My feeling is that the slight risk of regressions here is outweighed by the very nasty hangs without this fix.
Flags: needinfo?(jteh)
Attachment #9301021 - Flags: approval-mozilla-esr102?

Comment on attachment 9301021 [details]
Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2.

Approved for 102.6esr.

Attachment #9301021 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+

Verified as fixed on Win11 using Firefox build 102.6.0esr(20221205141915).

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: