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
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
We need to navigate past bullets when moving markers by character or word,
but we need to still include bullets when retrieving the string of a given
marker range.
Differential Revision: https://phabricator.services.mozilla.com/D87813
This uses the Gecko logging framework. To get debug logs set MOZ_LOG to
"MacAccessibility:4". To get verbose logging, set it to "MacAccessibility:5".
Differential Revision: https://phabricator.services.mozilla.com/D86618
I split the switch statement into two: the first switch determines the
MOX target accessible. The second one does all the rest. This makes it more
readable and scalable when we add more events that need to be accompanied with
data.
Differential Revision: https://phabricator.services.mozilla.com/D84053
This patch adds several new parameters:
* AXLeftWordTextMarkerRangeForTextMarker
* AXRightWordTextMarkerRangeForTextMarker
* AXStartTextMarkerForTextMarkerRange
* AXEndTextMarkerForTextMarkerRange
* AXNextTextMarkerForTextMarker
* AXPreviousTextMarkerForTextMarker
Our word boundaries API is pretty buggy. Instead of trying to
resolve or triage each issue I found, I added todo tests
for them.
Differential Revision: https://phabricator.services.mozilla.com/D83680
These classes do a few things:
1. They implement and abstract common text operations, for example:
(a) comparing two markers to know which one precedes the other.
(b) text retrieval for ranges
(c) geometric bounds for ranges
(d) etc.
2. They can be converted to and from AXTextMarker(Range)s. Since the AXTextMarker
should not contain a raw pointer since there is a potential for use-after-free,
we need to lookup the referenced accessible in its document to know that it still exists.
Note: mozTextAccessible got pushed to another unified source file, so we need to
declare some stuff for it. Ideally we would be detecting these kinds of things sooner.
Differential Revision: https://phabricator.services.mozilla.com/D81760
The delegate is associated with accessible documents (either local or remote).
I made a separate protocol for all the text marker stuff as it really is a seperate API.
Differential Revision: https://phabricator.services.mozilla.com/D81759
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.
Differential Revision: https://phabricator.services.mozilla.com/D77496
A casualty of this is the "switch" action description for pressing tabs. That code
goes way back to our first Mac a11y support. WebKit and Chromium don't have it.
I tried to figure out when other browsers or apps had that with no luck.
Anyway, removing that description gives us the same behavior in VO as
WebKit and Chromium where there are no custom action description strings.
Differential Revision: https://phabricator.services.mozilla.com/D77342
A casualty of this is the ability to change listed attribute names on the fly.
I think this is the right choice in general and doesn't seem to affect VO.
If we run into a case where it does we should reconsider.
Differential Revision: https://phabricator.services.mozilla.com/D77341
Keeping accessibilityAttributeNames because it calls additionalAccessibilityAttributeNames
which is used by subclasses.
Differential Revision: https://phabricator.services.mozilla.com/D77335
Add most attributes getters, setters and actions to prottocol,
autogenerate objective c dictionaries, and implement forwarding
logic from NSAccessibility methods.
Differential Revision: https://phabricator.services.mozilla.com/D76921
This sets up the possibility of moving most non-gecko things to a base class, and
start a protocol to add for all the subclasses to implement as needed.
Differential Revision: https://phabricator.services.mozilla.com/D76920