This means that the NSDictionaries will be constructed the first time the
wrapper function is called, and not at C++ static initializer time.
This avoids false positive warnings when running with the environment variables
`OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO`.
Differential Revision: https://phabricator.services.mozilla.com/D100976
Introducing this as a separate patch to simplify this changeset and first introduce a straightforward-ish implementation.
Differential Revision: https://phabricator.services.mozilla.com/D100731
Applying a bulk filter on accessibles in content process allows us to avoid a potentially large (and variable) number of IPC sync calls to retrieve the accessible names. I chose to implement this as a "post filter" and not to actually do the entire search in content because it would cause a lot of duplication of code for non-IPC searching, and we wouldn't have the flexibility to combine a text search with any arbitrary search key as the API requires.
I also generalized the RangeTypes.h header to PlatformExtTypes so it can be used to define filter types as well.
Differential Revision: https://phabricator.services.mozilla.com/D100730
It seems that VoiceOver depends on that property to know if a selection is be extended or moved. This manifests in several places in Slack when the user combines VO navigation with Slack's keyboard navigation.
Also changed where we retrieve the editable ancestor to simplify the notification dispatching block.
Differential Revision: https://phabricator.services.mozilla.com/D100452
This doesn't happen often. I can't find a reproducable case to test with. This happens with rapidly mutating content and is the result of some kind of race.
Differential Revision: https://phabricator.services.mozilla.com/D100174
This is a safeguard for endless recursion in HyperTextIterator::NormalizeForward. Will catch similar corruptions found in bug 1682692.
Differential Revision: https://phabricator.services.mozilla.com/D99926
By spec, it would need to be an area for aria-multiline=true and a field for aria-multiline=false. Chrome seems to assign all aria text boxes to areas. For some reason this allows VO to recognize links when editing. Webkit doesn't need this, for some reason and can get links announces in AXTextField as well.
Depends on D99312
Differential Revision: https://phabricator.services.mozilla.com/D99313
For focusable ancestor, just use editable ancestor since the IPC toll
on finding closest focusable ancestor isn't worth it.
Differential Revision: https://phabricator.services.mozilla.com/D99311
By spec, it would need to be an area for aria-multiline=true and a field for aria-multiline=false. Chrome seems to assign all aria text boxes to areas. For some reason this allows VO to recognize links when editing. Webkit doesn't need this, for some reason and can get links announces in AXTextField as well.
Depends on D99312
Differential Revision: https://phabricator.services.mozilla.com/D99313
This is consistent with how WebKit does it: if offset is between two accessibles,
return the previous one.
Depends on D99311
Differential Revision: https://phabricator.services.mozilla.com/D99312
For focusable ancestor, just use editable ancestor since the IPC toll
on finding closest focusable ancestor isn't worth it.
Differential Revision: https://phabricator.services.mozilla.com/D99311
This is done via an ifdef in the ARIAMap. Provisions, however, are there to simply remove the ifdef and if clauses from here and the test file to enable this on other platforms once alert double-speaking and other unwanted side effects are fixed on said platforms.
Differential Revision: https://phabricator.services.mozilla.com/D97584
XUL documents have a bunch of non-hypetext accessibles in their heirarchy. So you can't assume that a hyperlink's parent is a hypertext. To get around that, when we construct ranges for elements they should be internal ranges when possible.
Differential Revision: https://phabricator.services.mozilla.com/D98394
The normalize function was putting the current container/offset past the end boundary. This caused overruns with getting the text for the range of the input object, and some unexpected invalid ranges.
Differential Revision: https://phabricator.services.mozilla.com/D98236
It seems that VO mistakenly thinks the web area is a descendant of itself. This causes all kinds of cyclical parent child relationships that makes VO over-query us.
This patch remedies that by not returning the web area when do an immediate child search starting from the root group - in any direction.
Differential Revision: https://phabricator.services.mozilla.com/D97819
Safari has an inconsistent way to deal with list bullets in text.
If a given range has a list or list item nested inside it - but it is not
at the beginning, the bullet will not be returned as part of the text.But if the range begins at the start
of a list item, the preceding bullet is included. For example, given the following list:
* First Item
* Second Item
If the range is [irst Item], the text for that range should return as "irst Item",
but if the range is [First it], the returned text is "* First it".
This patch emulates that inconsistency by removing the list item considerations
in the text segments iterator, and instead prepending a bullet if needed.
Differential Revision: https://phabricator.services.mozilla.com/D97717
This allows `contenteditable` textboxes to work correctly with flattened text values.
The attribute setters, aside from AXValue, don't work in Chrome or Safari with aria textboxes,
so those are not a high priority. These include:
- AXSelectedText
- AXSelectedTextRange
- AXVisibleCharacterRange
In addition, AXVisibleCharacterRange's getter doesn't function as expected in Chrome or Safari either, so I didn't touch it.
Differential Revision: https://phabricator.services.mozilla.com/D97629
VoiceOver seems to do all the heavy lifting of figuring out what portion of the
live region should be read.
Depends on D96293
Differential Revision: https://phabricator.services.mozilla.com/D96294
I think VoiceOver uses this to pull in all live regions so it
can check for deletions when they change later on.
Depends on D96292
Differential Revision: https://phabricator.services.mozilla.com/D96293
We use an ivar boolean flag to cache the existance of a live region. This lets us
hide the live region AX attributes and avoid sync round trips to content.
Depends on D96291
Differential Revision: https://phabricator.services.mozilla.com/D96292
VoiceOver pre-caches live region data and does its own deltas to
know what to parts of a subtree changed, and what to announce
based on AXARIAAtomic and AXARIARelevant.
I added a removed event as well. This will help us cache a "live region"
flag in the main process and avoid sync round trips for attributes when not needed.
Differential Revision: https://phabricator.services.mozilla.com/D96291
VoiceOver seems to do all the heavy lifting of figuring out what portion of the
live region should be read.
Depends on D96293
Differential Revision: https://phabricator.services.mozilla.com/D96294
I think VoiceOver uses this to pull in all live regions so it
can check for deletions when they change later on.
Depends on D96292
Differential Revision: https://phabricator.services.mozilla.com/D96293
We use an ivar boolean flag to cache the existance of a live region. This lets us
hide the live region AX attributes and avoid sync round trips to content.
Depends on D96291
Differential Revision: https://phabricator.services.mozilla.com/D96292
VoiceOver pre-caches live region data and does its own deltas to
know what to parts of a subtree changed, and what to announce
based on AXARIAAtomic and AXARIARelevant.
I added a removed event as well. This will help us cache a "live region"
flag in the main process and avoid sync round trips for attributes when not needed.
Differential Revision: https://phabricator.services.mozilla.com/D96291
We use an ivar boolean flag to cache the existance of a live region. This lets us
hide the live region AX attributes and avoid sync round trips to content.
Differential Revision: https://phabricator.services.mozilla.com/D96292
VoiceOver pre-caches live region data and does its own deltas to
know what to parts of a subtree changed, and what to announce
based on AXARIAAtomic and AXARIARelevant.
I added a removed event as well. This will help us cache a "live region"
flag in the main process and avoid sync round trips for attributes when not needed.
Differential Revision: https://phabricator.services.mozilla.com/D96291
We should log attribute setting or action performing. We also probably should log AXRole, AXSubrole, AXSize and AXPosition in debug mode, just verbose.
Differential Revision: https://phabricator.services.mozilla.com/D96635
We use an ivar boolean flag to cache the existance of a live region. This lets us
hide the live region AX attributes and avoid sync round trips to content.
Differential Revision: https://phabricator.services.mozilla.com/D96292
VoiceOver pre-caches live region data and does its own deltas to
know what to parts of a subtree changed, and what to announce
based on AXARIAAtomic and AXARIARelevant.
I added a removed event as well. This will help us cache a "live region"
flag in the main process and avoid sync round trips for attributes when not needed.
Differential Revision: https://phabricator.services.mozilla.com/D96291
Both chrome and safari preserve the AXWebArea with no subroles, and apply the application subrole to the root group. Not doing so apparently breaks web applications badly.
Differential Revision: https://phabricator.services.mozilla.com/D96475
Both chrome and safari preserve the AXWebArea with no subroles, and apply the application subrole to the root group. Not doing so apparently breaks web applications badly.
Differential Revision: https://phabricator.services.mozilla.com/D96475
It seems like the GeckoTextMarker::Range can sometimes return invalid ranges.
We need to check if they are valid or not before marshalling them.
Differential Revision: https://phabricator.services.mozilla.com/D95230
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
AXTopLevelUIElement is not really testable because it doesn't give a useful result in
headless mode. Since it is a clone of AXWindow, this shouldn't be much of an issue.
Differential Revision: https://phabricator.services.mozilla.com/D94154
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Besides the ARIA role invalidation, this fixes an issue where the mozAccessible's role is also incorrect when the aria role changes on a body tag.
Depends on D93439
Differential Revision: https://phabricator.services.mozilla.com/D93440
Instead of having the web area be the implicit root, the search results should
exclusively be descendants of the target element that the search is called on.
Differential Revision: https://phabricator.services.mozilla.com/D91826
The left and right line getters don't seem to be used often by voiceover,
so I am not sure if they always return the expected result.
Differential Revision: https://phabricator.services.mozilla.com/D90938
There are at least 8 different methods for getting a range from an offset:
1. left word
2. right word
3. line
4. left line
5. right line
6. sentence
7. paragraph
8. range with same style.
Having a single wrapper and IPDL method for all of those with an enum would remove
a lot of redundancies.
Differential Revision: https://phabricator.services.mozilla.com/D90936
When a doc does not have top-level DOM group, or consists of a single leaf,
we need to insert a generated root group. The rotor API expects this and uses
it for boundary detection.
Differential Revision: https://phabricator.services.mozilla.com/D90174