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
Platform accessibles from proxies were not getting pruned. Also, there is no need
to walk up ancestors to find a pruning container since all pruning containers have direct
leaf children.
Differential Revision: https://phabricator.services.mozilla.com/D72482
The code in mozAccessible SubRole was actually never executed for inputs, so the SearchField sub role was never set. Moved the implementation to mozTextAccessible. Also reenabled the tests from bug 1634373, which now pass.
Depends on D73308
Differential Revision: https://phabricator.services.mozilla.com/D73735
I also simplified mozTextLeafAccessible by redirecting value to title. And removing some dead methods. It previously was calling Text() on the text accessible, but this is not necessary since Name() returns
the same value.
Differential Revision: https://phabricator.services.mozilla.com/D72584
This is the recommended role in the HTML Accessibility API Mappings draft[1].
Although Chrome and Safari just expose unlinked a tags as AXStaticText.
They also don't update the accessble if it gets an href. So while we
are doing this a bit differently, I think it is probably better. And VO is happy.
1. https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings
Differential Revision: https://phabricator.services.mozilla.com/D71260
I really don't understand why this is what VoiceOver needs, but it seems to do the trick.
Differential Revision: https://phabricator.services.mozilla.com/D70776
--HG--
extra : moz-landing-system : lando
We need to do this because we can't rely on the main children cache invalidation.
Also, I don't think this really worked before with cell additions to a row, since only
the row's children would be invalidated, and the table's children would remain untouched.
Differential Revision: https://phabricator.services.mozilla.com/D69879
--HG--
extra : moz-landing-system : lando
The latter seems more accurate to what that method does, since we don't necessarily
forward that event to the OS, but might instead use it to update cached properties.
Differential Revision: https://phabricator.services.mozilla.com/D69878
--HG--
extra : moz-landing-system : lando
Having this kind of method will let us know what the states of interest are.
If all the states are cached we can return them without inquiring the full state.
Differential Revision: https://phabricator.services.mozilla.com/D69130
--HG--
extra : moz-landing-system : lando
This makes it possible to get the `representedView` even after the accessible goes away on shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D68489
--HG--
extra : moz-landing-system : lando
I made more generalized mozSelectableAccessible and
mozSelectableChildAccessible classes for other things that will need
this kind of support.
Differential Revision: https://phabricator.services.mozilla.com/D66304
--HG--
extra : moz-landing-system : lando
As the message above suggests this does two things:
1. We filter out the invisible popup menus from the root's children.
2. We dispatch menu opened and closed events.
The latter helps VoiceOver retain some context about the mutating tree and notify the user about the menu.
Differential Revision: https://phabricator.services.mozilla.com/D65612
--HG--
extra : moz-landing-system : lando
This is to match the actual class it implements.
Differential Revision: https://phabricator.services.mozilla.com/D65611
--HG--
rename : accessible/mac/mozDocAccessible.h => accessible/mac/mozRootAccessible.h
rename : accessible/mac/mozDocAccessible.mm => accessible/mac/mozRootAccessible.mm
extra : moz-landing-system : lando
We were using the wrong Accessible method to get the level. We also need to swap IPDL methods to use the right one.
Differential Revision: https://phabricator.services.mozilla.com/D65645
--HG--
extra : moz-landing-system : lando
This is similar to the fix in bug 1614079 where we need to account
for a descendant that might match past a process boundary.
Differential Revision: https://phabricator.services.mozilla.com/D63974
--HG--
extra : moz-landing-system : lando
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55443
--HG--
extra : moz-landing-system : lando
Mark the html:mark element to the new ROLE_MARK, which currently maps the same as role_text, and the xml-role of "mark", make sure we expose the roleDescription on Mac, and adjust the test so it tests that the attributes don't pick up any unexpected color for this particular element. So, the background attribute is empty when there is no unexpected, non-default background color.
Differential Revision: https://phabricator.services.mozilla.com/D52989
--HG--
extra : moz-landing-system : lando
1. When creating a DocAccessibleParent for an embedded document in an OOP iframe, it's possible that the embedder accessible hasn't been set yet.
This can occur if the iframe is initially hidden.
Previously, we incorrectly set the document up as a top level document (e.g. tab document) in this case.
Now, we set up the document as top level in its content process, set up the proxy, etc.
The document will be added to its child document later when the embedder is set.
2. When setting the embedder accessible for an OOP iframe, check if the embedded DocAccessibleParent already exists.
This can happen if an iframe is hidden and then shown or an iframe is reflowed by layout.
If it already exists, add the embedded (child) document to its embedder.
3. Mac's implementation of ProxyCreated requires that AddChildDoc be called *before* ProxyCreated so it can invalidate the native children of the parent.
Because it's possible for an OOP iframe document to be added to its embedder after the document is created, we can't satisfy this requirement for OOP iframe documents.
Therefore, we now allow a null parent in Mac's ProxyCreated and use the reorder event fired later to invalidate the native children.
Differential Revision: https://phabricator.services.mozilla.com/D51357
--HG--
extra : moz-landing-system : lando
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D49056
--HG--
extra : moz-landing-system : lando
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`. Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.
Differential Revision: https://phabricator.services.mozilla.com/D26663
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.
Differential Revision: https://phabricator.services.mozilla.com/D13046
--HG--
extra : moz-landing-system : lando
IA2 now has IA2_ROLE_CONTENT_INSERTION/DELETION.
Mac has AXInsert/DeleteStyleGroup subroles.
We now create accessibles for these elements and expose the appropriate role.
For ATK, there is no specific role for these, so we just use the generic ATK_ROLE_SECTION.
MozReview-Commit-ID: 2khzRa7BQ6z
--HG--
extra : rebase_source : e1c84bdef9a23b225e9870660050790df94c4beb
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.
MozReview-Commit-ID: 5UQVHElSpCr
--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
And likewise for AttrCharacteristics::attributeName.
MozReview-Commit-ID: DwGzWCCKcVP
--HG--
extra : rebase_source : ac595af0b0da2cee36b5aecf4474880fbe993f11
Gecko has two document roles: roles::DOCUMENT_FRAME and roles::DOCUMENT.
However, the former was not being used at all; the latter was being used
for both ARIA documents and for the native document container. We can
therefore fix this issue by repurposing the unused internal role:
* Rename the role from roles::DOCUMENT_FRAME to roles::NON_NATIVE_DOCUMENT,
and add clarification to the doc strings in Role.h
* Ensure load events are still emitted for ARIA documents (bug 759833)
* Update the ARIA-document mochitests to reflect the above changes
* Change the ATK role mapping for roles::DOCUMENT (the native container)
from ATK_ROLE_DOCUMENT_FRAME TO ATK_ROLE_DOCUMENT_WEB.
* On IAccessible2, map roles::NON_NATIVE_DOCUMENT to ROLE_SYSTEM_DOCUMENT.
This should cause there to be no change in behavior for that platform.
* On macOS map roles::NON_NATIVE_DOCUMENT to NSAccessibilityGroupRole
with a subrole of AXDocument.
--HG--
extra : rebase_source : bb6bacfa08c0d22e4e52a25d309d15b2a913320d
(Path is actually r=froydnj.)
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.
MozReview-Commit-ID: 91U22X2NydP
--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.
--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
Perform a sanity check in Accessible::ARIATransformRole() for the
internal REGION role: If there is no accessible name, transform
the ARIA role into the native host language role. Also perform
a sanity check when getting the AXSubrole in macOS: If the roleAtom
is nsGkAtoms::region, only return AXLandmarkRegion if the internal
role is REGION.
Create a new internal REGION role which maps to the generic landmark role
of each platform accessibility API. Update the internal mapping of region
from roles::PANE and kGenericAccType to roles::REGION and eLandmark. Also
change the AXSubrole of region from "AXDocumentRegion" to "AXLandmarkRegion",
the latter being what is specified in the Core AAM 1.1 and used in Safari.
Add orientation() method to the macOS accessibility wrapper, mapping
states::Horizontal to NSAccessibilityHorizontalOrientationValue,
states::NSAccessibilityVerticalOrientationValue and the absence of
both to NSAccessibilityUnknownOrientationValue.
DPub ARIA AXLandmarkRegion-maped roles should have an AXRoleDescription
value of "region"; not "group." This requires an explicit mapping, which
was not done during the initial implementation. No new test cases because
we currently have no means to test platform-accessibility-API mappngs via
mochitest.
According to the Core Accessibility API Mappings 1.1 spec, on macOS,
the separator role should have AXRoleDescription "splitter" and no
subrole. The incorrect AXRoleDescription is due to the subrole mapping
to AXContentSeparator. Thus removing the latter fixes the former.
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
This implements the roles, states, and action names, but omits the state change event part that is currently made impossible by us recreating the html:summary accessible once it toggles the html:details open state. This is probably due to some reframing causing us to recreate the accessible. Suggest to move that to a separate bug and implement the basics now and the event later.
MozReview-Commit-ID: FEi5RIXdkG0
--HG--
extra : rebase_source : 9b65bc28483238e2339561e6494ccc2884cb7c42
For these events atk needs to know about the widget not the event target, and
the easiest way to support that is by adding a new event message that sends the
widget id.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
The NSAccessibilityHelpAttribute is being repurposed here, too, to expose the information other platforms call the Accessible Description rather than the Accessible Help tag, which traditionally referred to a connection to a Windows help file in old MSAA.
--HG--
extra : commitid : It2o0CiKUxb
extra : rebase_source : 06f20dcafbb937f103a3ed3de5681576518c037e