When content analysis is on, pastes will be checked by the CA
agent while tab input is blocked. The synchronous nsIClipboard.getData()
method must block until the analysis result is received, so this
requires doing a SpinEventLoopUntil.
Differential Revision: https://phabricator.services.mozilla.com/D196997
Even when there is a valid popovertarget, per the spec, these relations must not be exposed in certain cases.
This requires some special case code.
The code for calculating the DETAILS relation for popover invokers has been encapsulated in its own function.
We also use this to validate the reverse DETAILS_FOR relation on popovers.
Normally, when pushing cached relations to the parent process, we use IDRefsIterator so that we don't push implicit reverse relations.
For popover invokers, this wouldn't validate the other conditions.
To avoid duplicate special case code in RemoteAccessible, we use RelationByType for the DETAILS relation instead of IDRefsIterator when pushing the cache.
This leverages the LocalAccessible special case code for popover invokers.
This is fine for the DETAILS relation because nothing ever exposes an implicit reverse DETAILS relation.
Differential Revision: https://phabricator.services.mozilla.com/D199954
A popover can have multiple invoker buttons.
Previously, we only fired a state change event on the button which was invoked.
This meant that the cached expanded/collapsed state of any other invokers was stale.
To facilitate this:
1. Add popovertarget to DocAccessible's kRelationAttrs so that we track reverse relationships. This will also later be used for exposing relations.
2. When an Accessible is shown or hidden, if it is a popover, use RelatedAccIterator to get all the invokers and fire appropriate state change events on each of them.
3. This also means we can get rid of nsAccessibilityService::PopovertargetMaybeChanged, since this explicit notification from DOM is no longer useful.
4. Add popovertarget to LocalAccessible::AttributeChangesState so that we fire an event for the expandable/expanded/collapsed state change if appropriate when that attribute is changed.
Differential Revision: https://phabricator.services.mozilla.com/D199842
This revision 'implements' the 'generic' ARIA role mapping by mapping ARIA
'generic' to Gecko 'section.' This isn't a full implementation of 'generic' - it
sidesteps it to avoid dealing with larger 'generic' issues (namely: that there
are multiple roles that are 'generic' in Gecko currently). We'll sort that out
in a later commit. This revision adds a new web platform test to verify that the
generic role actually overrides an element's implicit role.
Differential Revision: https://phabricator.services.mozilla.com/D200133
This revision adds role mappings for the 'time' ARIA role by implementing HTML
markup mapping, adding platform mappings, and adding the role info itself. This
revision also enables the previously-failed wpt tests and fixes other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200132
This revision implements mapping for the ARIA 1.2 'strong' role by adding a
markup mapping, a role definition, and platform mappings. This revision also
removes the expected failures in the wpt test suite and fixes other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200131
This revision implements the mapping for the ARIA 1.2 emphasis role, which was
unsupported in Firefox until now. This change addresses a web platform test
failure. To accomplish this, the revision adds the WAI-defined role, adds a role
enum value, adds platform mappings, and adds a markup role mapping. The change
requires a new static atom for the word "emphasis," also added in this revision.
Finally, this change removes the expected wpt failure and updates other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200130
This revision 'implements' the 'generic' ARIA role mapping by mapping ARIA
'generic' to Gecko 'section.' This isn't a full implementation of 'generic' - it
sidesteps it to avoid dealing with larger 'generic' issues (namely: that there
are multiple roles that are 'generic' in Gecko currently). We'll sort that out
in a later commit.
Differential Revision: https://phabricator.services.mozilla.com/D200133
This revision adds role mappings for the 'time' ARIA role by implementing HTML
markup mapping, adding platform mappings, and adding the role info itself. This
revision also enables the previously-failed wpt tests and fixes other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200132
This revision implements mapping for the ARIA 1.2 'strong' role by adding a
markup mapping, a role definition, and platform mappings. This revision also
removes the expected failures in the wpt test suite and fixes other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200131
This revision implements the mapping for the ARIA 1.2 emphasis role, which was
unsupported in Firefox until now. This change addresses a web platform test
failure. To accomplish this, the revision adds the WAI-defined role, adds a role
enum value, adds platform mappings, and adds a markup role mapping. The change
requires a new static atom for the word "emphasis," also added in this revision.
Finally, this change removes the expected wpt failure and updates other tests.
Differential Revision: https://phabricator.services.mozilla.com/D200130
These loops may run script.
In `HyperTextAccessible`, it calls
`RemoveRangeAndUnselectFramesAndNotifyListeners`. So, chrome script which is not
directly related to this module may run in each call. I think that using
`RemoveAllRanges` is better for here. Before bug 1735446, this loop tried
to keep first range, but accidentally, I changed this loop delete all ranges.
However, `SetSelectionBoundsAt` will add a range if it's required and there is
no bug reports. Therefore, I think keep the new behavior is better.
In `nsRange::DeleteFromDocument`, the loop may run mutation events too.
Therefore, it needs to store all ranges first. Then, the preceding patch
changes the behavior here if a selection range is moved to different root.
Previously, it was deleted, but now, they are not touched.
Depends on D200606
Differential Revision: https://phabricator.services.mozilla.com/D200607
This revision aims to add support for the 'term' and 'definition' ARIA roles.
These roles already exist in Gecko, but aren't fully mapped where they should
be. To address the problem, this revision adds a static atom for "definition,"
implements the ARIA map for definition, adds a markup map entry for the dfn
element (which has the DEFINITION role), and puts the term and definition atoms
in the role map. As a consequence of these changes, this revision also removes
the expected web platform test failures and updates other existing tests.
Differential Revision: https://phabricator.services.mozilla.com/D200219
Querying a handle's name can hang forever in some cases.
I'm hoping (albeit doubtfully) that GetNamedPipeServerProcessId might not hang where querying the handle's name does, and also that the handle that's hanging isn't the handle we need.
This seems to fix the problem for one user, so maybe my doubts are unfounded.
Differential Revision: https://phabricator.services.mozilla.com/D197035
While bug 1861671 improved menupopup styling to closer match modern macOS, there were still several discrepancies between native and non-native menu metrics. The following adjustments were made in this patch to match native styles:
- Don't render the checkmark containers for menus with no checked or checkable items
- Adjusted various spacings to match native metrics
- Apply padding to the accelerator container only if an accelerator is present
- Fixed regression from bug 1861671 resulting in menuitems being misaligned with sub-menus
These changes result in non-native menupopups appearing nearly indistinguishable from native menus.
Differential Revision: https://phabricator.services.mozilla.com/D199787
It's only used from some crashtests, and it hasn't worked in a long,
long time, due to it not having the right styles in xul.css
Differential Revision: https://phabricator.services.mozilla.com/D200361
The markup <input type="search"> will report a ComputedARIARole of "textbox,"
which isn't correct - it should return "searchbox." To address this issue, this
revision implements a change to ComputedARIARole for searchboxes, checking
IsSearchbox() and returning the searchbox atom if so. This revision also enables
the previously expected-failure relevant web platform test, since we now pass it.
Differential Revision: https://phabricator.services.mozilla.com/D200235
Per HTML AAM, HTML hgroup elements should have an implicit role=group instead
of being generics. This revision implements that by mapping hgroup elements to
roles::GROUPING in HTMLMarkupMap. It also removes the expected fail from the
relevant web platform test, which we now pass.
Differential Revision: https://phabricator.services.mozilla.com/D200204
`searchbar-search-button` includes two `<image>` elements, one of which is aimed to visually communicate that this `overlay` image could expand/collapse the search autosuggest list. This `<hbox>` that has an accessible name but lacks an appropriate interactive role and state, because it functions as a button (not focusable with keyboard because the alternative - `Escape` key - exists and works to collapse the autosuggest list and we do not want to create an additional tab stop for keyboard-only users). This would prevent users of speech-to-text/Voice Control from being able to send a click to it by calling its label and screen reader users and users of other assistive technology would not be able to get to this control via shortcuts like a list of controls, etc.
This issue is similar to the `Go` button on the URL bar resolved in the bug 1864962 and to the `Submit search` button tracked in bug 1871596
To activate the searchbar next to the URL Bar that includes this go button: `about:preferences` > `Search` > `Search Bar` > select `Add search bar in toolbar`.
Depends on D199504
Differential Revision: https://phabricator.services.mozilla.com/D197335
This would allow browser test like `accessible/tests/browser/tree/browser_searchbar.js` to test accessible roles in the Accessibility tree for buttons with `aria-haspopup` attributes.
Depends on D199394
Differential Revision: https://phabricator.services.mozilla.com/D199504
This makes accessing `Manager()` on an IPDL protocol safer, and replaces the
previous ActorLifecycleProxy reference, which would only keep the manager alive
until IPDL drops its reference.
Unfortunately this introduces some leaks due to reference cycles, which will be
fixed in follow-up parts.
Differential Revision: https://phabricator.services.mozilla.com/D198624
If we send an Android ACCESSIBILITY_FOCUSED event because of a content
update (ie. scrolling to anchor or DOM selection changes) we should not
scroll the accessible into view. We should assume the content is being
brought into view by itself.
Testing: We already have tests to show that we scroll an accessible into
view when navigating content, testing for the inverse (that the scroll
is done by other means and NOT a11y) is very hard.
Differential Revision: https://phabricator.services.mozilla.com/D199433
Extend a bit the test for dynamic changes to content-visibility, adding
the following checks:
* If there are text descendants in the content-visibility subtree,
make sure they are created when switching to auto ; and removed
when switching back to hidden.
* If there is a content-visibility: hidden or a visibility: hidden
descendant, make sure pruning still applies when switching to
auto.
* If there is a shadow host in the content-visibility subtree,
make sure that shadow subtree is properly updated when
content-visibility changes.
Differential Revision: https://phabricator.services.mozilla.com/D196964
setBoolPref has a persistent effect for the rest of the test run (potentially
affecting the behavior of other prefs), so we don't want to use
that. This test is currently failing when run in test-verify mode as a result
of this. With pushPrefEnv, the test will properly undo its pref-modification
when it completes.
Note: I'm moving the pref-toggle statement inside of a function so that I can
use the ergonomic `await` syntax. This is still essentially right at the start
of the test, since `doTests` is the main function here.
Differential Revision: https://phabricator.services.mozilla.com/D197830
The methods are in `nsCaret`, `nsFrameSelection` and `dom::Selection`. That
makes harder to read, and they are called each other, so, they are reused for
different purpose. Therefore, it must be better to move them into a new class.
Then, the name differences may become more unclear. If you think so, feel free
to request renaming some methods of them.
Differential Revision: https://phabricator.services.mozilla.com/D197288
ContentRemoved recursively walks both AllChildrenIterator and direct DOM children.
In addition, we might get duplicate notifications from DOM and layout, plus PruneOrInsertSubtree might do a recursive walk and it too calls ContentRemoved.
To avoid this duplicate processing, keep a set of removed DOM nodes on the DocAccessible which we clear after mutation events are processed.
Differential Revision: https://phabricator.services.mozilla.com/D196707
std::sort used by nsTArray::Sort expects the comparator to be tolerant
for being called to compare the very same element with itself.
Differential Revision: https://phabricator.services.mozilla.com/D195482