No a11y focus events after starting Firefox until you switch away from and back to Firefox
Categories
(Core :: Disability Access APIs, defect, P1)
Tracking
()
People
(Reporter: Jamie, Assigned: Jamie)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
This was reported to us by the JAWS screen reader and ZoomText magnifier vendor (Vispero). It causes problems for both products.
Steps to repro with AccEvent:
- Run AccEvent in MSAA mode (in or out of process).
- Subscribe to OBJ_FOCUS event only.
- Run Firefox.
- Press Tab a few times, check if Firefox fires focus events.
- Close Firefox.
- Repeat steps 3-5 if the issue is not reproducible.
Results:
- After the problem happens for the first time, it’s reproducible all the time during windows session.
- The only focus event reported by Firefox is:
OBJ_FOCUS HWND=00000000000502E0 idObject=FFFFFFFFFFFFFFFC idChild=0 Window Class="MozillaWindowClass" [Error: getting object: hr=0xFFFFFFFF80004005 - Unspecified error]
- Switching to another app and then back, fixes the problem and Firefox reports normal focus events:
OBJ_FOCUS HWND=00000000000502E0 idObject=FFFFFFFFFFFFFFFC idChild=0 Window Class="MozillaWindowClass" Name="Mozilla Firefox" Role=application State=read only,busy,sizeable,moveable,focusable
OBJ_FOCUS HWND=00000000000502E0 idObject=FFFFFFFFFFFFFFFC idChild=FFFFFFFFFE7FFFBE Window Class="MozillaWindowClass" Name="Open context menu for mail.google" Role=menu button State=focused,floating,focusable,has popup
- The problem is also gone if a dialog or file menu is opened with mouse or hot key.
- The problem is also gone if a tool tip is shown and Jaws or ZoomText running.
- The problem is not reproducible with AccEvent if there are some additional event subscriptions like OBJ_LOCATIONCHANGE.
- There are no issues with AccEvent working in UIA mode.
- There are no Firefox.exe instances after Firefox is closed.
here's what's happening here:
- When the skeleton UI appears, Windows fires EVENT_OBJECT_FOCUS for the HWND as it always does when an HWND gets focus.
- A client processing EVENT_OBJECT_FOCUS will send WM_GETOBJECT.
- We return E_FAIL to stop clients from getting (and potentially caching) a generic oleacc client proxy which won't provide any useful info.
- Since the skeleton UI HWND continues to be used once the real UI loads, no other focus event is fired by Windows.
- Since WM_GETOBJECT is never received by the real UI, the Gecko a11y engine is never initialised.
- Since the Gecko a11y engine is never initialised, we never fire most a11y events.
- Since most a11y events are never fired, some clients never call WM_GETOBJECT, so this nasty situation continues until the user switches away from and back to Firefox, at which point Windows will finally fire another focus event.
This doesn't seem to affect NVDA. My guess is that this is either timing or perhaps NVDA responds to some other event (e.g. caret) that Firefox does still fire. However, we should not be relying on this; JAWS and ZoomText are not at fault here.
The intuitive solution is to avoid returning E_FAIL in the Skeleton UI. While this would mean clients do get an IAccessible for the initial focus, it would be useless to them (it might even cause a useless IAccessible to be cached by the client) and it still wouldn't initialise the Gecko a11y engine.
I think we can solve this by firing EVENT_OBJECT_FOCUS with the Firefox hwnd, OBJID_CLIENT and CHILDID_SELF once the real UI appears. Clients should pick this up and send WM_GETOBJECT, triggering the Gecko a11y engine as normal. Because the initial focus event returned E_FAIL, clients shouldn't ignore this as a duplicate. The main challenge will be figuring out where this code needs to go.
Assignee | ||
Comment 1•3 years ago
|
||
[Tracking Requested - why for this release]: Users of JAWS and ZoomText, two popular accessibility products, sometimes won't be able to access Firefox until they alt+tab away from and back to Firefox. While alt+tabbing is a simple workaround, this is far from ideal and some users may not understand they need to do this, rendering Firefox unusable to them.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Vispero tested a try build and confirmed the fix works for them.
Updated•3 years ago
|
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/50fe91fffe4c Fire a focus win event when the real UI replaces the skeleton UI. r=mhowell,dthayer
Comment 6•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 7•3 years ago
|
||
James, should this be uplifted to 95 beta or should it ride the 96 train?
Assignee | ||
Comment 8•3 years ago
|
||
I think it should be uplifted. I'm waiting for confirmation from the vendor who reported it to ensure it is fixed for them. That said, they already confirmed the fix in a try build and I verified the fix with testing tools in nightly myself, so if you'd prefer not to wait, I can submit the uplift request sooner.
Comment 9•3 years ago
|
||
We can wait for the vendor to confirm, thanks.
Assignee | ||
Comment 10•3 years ago
|
||
The vendor says:
There are no issues with Firefox 96.0a1 (2021-11-10) build.
Assignee | ||
Comment 11•3 years ago
|
||
Comment on attachment 9249668 [details]
Bug 1739920: Fire a focus win event when the real UI replaces the skeleton UI.
Beta/Release Uplift Approval Request
- User impact if declined: Users of the JAWS screen reader and ZoomText magnifier will sometimes not be able to access Firefox until they switch apps.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Simply fires an additional a11y focus event for our main window.
- String changes made/needed: None.
Comment 12•3 years ago
|
||
Comment on attachment 9249668 [details]
Bug 1739920: Fire a focus win event when the real UI replaces the skeleton UI.
Approved for 95.0b6
Comment 13•3 years ago
|
||
bugherder uplift |
Comment 14•3 years ago
|
||
Did you want to nominate this for ESR91 approval also?
Assignee | ||
Comment 15•3 years ago
|
||
Comment on attachment 9249668 [details]
Bug 1739920: Fire a focus win event when the real UI replaces the skeleton UI.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Impacts users of the JAWS screen reader, which is often used in enterprise.
- User impact if declined: Users of the JAWS screen reader and ZoomText magnifier will sometimes not be able to access Firefox until they switch apps.
- Fix Landed on Version: 96, uplifted to 95
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Simply fires an additional a11y focus event for our main window.
- String or UUID changes made by this patch: None.
Comment 16•2 years ago
|
||
Comment on attachment 9249668 [details]
Bug 1739920: Fire a focus win event when the real UI replaces the skeleton UI.
Approved for 91.4esr.
Comment 17•2 years ago
|
||
bugherder uplift |
Comment 18•2 years ago
|
||
Can not be verified on QA Softvision side since we don't have a JAWS account (paid subscription).
Description
•