A file input contains two native anonymous children: the Browse button and the file name label.
Previously, we exposed the file input as a group in the a11y tree and its anonymous children as children of that group.
While this is semantically correct, it causes several problems for screen readers.
First, if the author provides a label or description, that gets exposed on the group.
Some screen readers ignore either one or the other depending on the screen reader, what the author specified and how the user navigated there.
Second, the file name label isn't focusable and wasn't associated to the group in any way aside from being a child.
This meant that a screen reader user might not perceive it in some cases.
Since most users understand a file input as a single control anyway, we now just expose the input as a simple button containing two text leaves.
However, unlike most buttons, we need to append the text to the name even if the author specifies a name.
As a bonus, this simplifies some code, since we no longer need to redirect focus or events.
An additional problem was that the file input previously returned false for LocalAccessible::IsWidget, which meant that a wrapping HTML label wasn't associated correctly.
This has been fixed as well, although this fix could have applied just as easily to the previous group implementation.
Differential Revision: https://phabricator.services.mozilla.com/D191264
This is necessary to work around a bug in the Windows UI Automation -> IAccessible2 proxy.
See the code comments for details.
Differential Revision: https://phabricator.services.mozilla.com/D187529
We need this so that Python comtypes can generate bindings for IAccessible2.
This is almost identical to what was here before, but it excludes some stuff that was only needed for the COM interceptor.
Differential Revision: https://phabricator.services.mozilla.com/D187745
Our mochitest harness always runs a pywebsocket3 server which supports handlers as files in any test directory.
We use this to implement a WebSocket which takes Python code as input and returns a JSON serialised result or exception.
The Python code is wrapped in a function so that it can return a result by simply using the return statement.
Python code run via the WebSocket has its own globals namespace.
OS specific things will be placed in this namespace for convenience in future patches.
Tests might also use Python globals to persist things they don't want to keep retrieving every call.
A runPython function has been added to shared-head.js to be called by browser tests.
This manages connection to the WebSocket, sending the code, asynchronously handling the response, etc.
It simply takes Python code as a string and returns the deserialised result.
Differential Revision: https://phabricator.services.mozilla.com/D187744
Starting with Windows 11 22H2, Microsoft has made internal changes in
msctf.dll. The TF_Notify function, also known as CtfImmNotify from
imm32.dll, uses a new convention for its third argument. These changes
are incompatible with current versions of ZoneAlarm Anti-Keylogger,
resulting in crashes in our main process.
This patch converts messages forwarded by ZoneAlarm Anti-Keylogger to
the new convention. If we detect the product and an incompatible version
of msctf.dll, then we hook TF_Notify and detect any message using the
old convention, and convert it to the new convention.
Differential Revision: https://phabricator.services.mozilla.com/D189518
Previously, we cached when a UIA client was blocked or when there were no UIA clients.
However, we did not cache the result when a UIA client was present but *not* blocked.
This isn't normally a problem because a11y is normally instantiated in this case, which means we won't try to do any client detection again this session.
However, if a11y is force disabled via the pref, we still do detection, but we don't instantiate.
This meant that a UIA client which hammered us with queries would keep triggering the detection code, since we weren't caching the result.
That resulted in severe performance degradation for impacted users.
To fix this, cache the UIA detection result even if we do allow a11y instantiation.
Differential Revision: https://phabricator.services.mozilla.com/D187869
Now that the minimum supported version of the mac SDK is 13.3, all the
macro-based checks for SDK versions older than that are always false.
Remove them.
Differential Revision: https://phabricator.services.mozilla.com/D187639