Граф коммитов

11229 Коммитов

Автор SHA1 Сообщение Дата
James Teh 69b36e34e7 Bug 1911505: Expose highlighted text to Mac a11y. r=morgan,eeejay
We do this via the undocumented AXHighlight attribute, as gleaned from the WebKit and Chromium source code.

Differential Revision: https://phabricator.services.mozilla.com/D218513
2024-08-26 02:02:46 +00:00
Eitan Isaacson 18aaf8210f Bug 1772375 - Initial support for MacOS full keyboard access. r=morgan
This feature relies mostly on a search predicate key we did not support.
With that added we at least get some functionality although you encounter
bugs pretty quickly. For example a button after a password field loses focus,
but this seems to be a bug in Safari too. I think the browser support here in general
is pretty underwhelming at this time.

Note: This just works because we now start a11y when a role is retrieved, so
we don't need to sniff out any special FKA settings.

Differential Revision: https://phabricator.services.mozilla.com/D219822
2024-08-23 23:15:12 +00:00
Iulian Moraru f44e7c6f95 Backed out changeset ec19883ae28f (bug 1911518) for causing browser-a11y failures on browser_range.js. CLOSED TREE 2024-08-22 21:17:48 +03:00
Eitan Isaacson cb942059a2 Bug 1911518 - Don't use mozTextAccessible on container comboboxes. r=Jamie
This still does not resolve ARIA 1.0 styled boxes where the entry aria-owns the list.

Differential Revision: https://phabricator.services.mozilla.com/D218983
2024-08-22 17:22:27 +00:00
Gijs Kruitbosch 22f3bddb58 Bug 1822975 - clean up places that manually enable broader async stacks which is now the default in tests, r=devtools-reviewers,firefox-desktop-core-reviewers ,geckoview-reviewers,mconley,ohall
Differential Revision: https://phabricator.services.mozilla.com/D215204
2024-08-22 14:48:07 +00:00
Narcis Beleuzu 776a4c428b Backed out changeset 1e117d4cb718 (bug 1911505) for causing mochitests failures in browser_attributed_text.js . CLOSED TREE 2024-08-22 03:19:36 +03:00
James Teh 32cdecbd20 Bug 1911505: Expose highlighted text to Mac a11y. r=morgan,eeejay
We do this via the undocumented AXHighlight attribute, as gleaned from the WebKit and Chromium source code.

Differential Revision: https://phabricator.services.mozilla.com/D218513
2024-08-21 21:54:10 +00:00
Florian Quèze f2cbd43752 Bug 1913624 - Remove expired telemetry histogram A11Y_UIA_DETECTION_TIMING_MS, r=TravisLong.
Depends on D219485

Differential Revision: https://phabricator.services.mozilla.com/D219486
2024-08-21 09:14:33 +00:00
Peter Van der Beken 2ddc0f8713 Bug 1912083 - Switch url argument to UTF8 string. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D218947
2024-08-20 07:56:25 +00:00
Eitan Isaacson 03a9fd6883 Bug 1900668 - Use GDBusProxy for platform a11y enabled check. r=Jamie
Also, listen for changes in IsEnabled property.

Differential Revision: https://phabricator.services.mozilla.com/D212593
2024-08-09 16:17:17 +00:00
James Teh 786351922e Bug 1798620 part 2: Remove DocAccessibleParent::mParentDoc. r=eeejay
We have RemoteAccessible::mParent and RemoteAccessible::mDoc, so DocAccessibleParent::mParentDoc was redundant.
Aside from the redundancy, this was one extra thing we needed to keep up to date and reason about.

This involved changing the call to RemoveChildDoc in Destroy to use Unbind instead because Unbind clears the parent RemoteAccessible, but RemoveChildDoc didn't.
That meant we had a dangling RemoteAccessible::mParent pointer, which was always a problem, but is more problematic now that we no longer have mParentDoc and the destructor checks the parent document.
Since Unbind is the only caller of RemoveChildDoc, RemoveChildDoc has been merged into Unbind.
This means there is now only a single place where child documents are unbound from their parent, which should make things easier to reason about.

Differential Revision: https://phabricator.services.mozilla.com/D218802
2024-08-09 01:45:31 +00:00
James Teh 7756c8f5dd Bug 1798620 part 1: Make RemoteAccessible::mParent a pointer instead of an id. r=eeejay
While an id was slightly safer, it also required a hash lookup every time we retrieved a parent.
This got expensive when there was a lot of tree walking, particularly given that we walk ancestors in some cases and we have to get the parent for NextSibling and PrevSibling.
Instead, mParent is now a RemoteAccessible pointer.
mChildren is already raw pointers (even when crossing documents) and we haven't encountered problems there recently, so I don't anticipate safety problems here.

Differential Revision: https://phabricator.services.mozilla.com/D218801
2024-08-09 01:45:31 +00:00
James Teh 0c667fd10a Bug 1910803: When checking if frames are on different lines in a11y, check if the frames are in different line lists before comparing their LineIterators. r=morgan
For example, one of the frames could be in the block's main in-flow line list and the other could be in an overflow list.
When this happens, it's not valid to compare LineIterators, so we must compare the line lists first.

Differential Revision: https://phabricator.services.mozilla.com/D218613
2024-08-07 22:51:58 +00:00
Narcis Beleuzu 0fb8ac8e50 Backed out changeset de9fbd4835b7 (bug 1900668) for mochitest leakchecks. CLOSED TREE 2024-08-06 23:53:19 +03:00
Eitan Isaacson 17d06ccb0d Bug 1900668 - Use GDBusProxy for platform a11y enabled check. r=Jamie
Also, listen for changes in IsEnabled property.

Differential Revision: https://phabricator.services.mozilla.com/D212593
2024-08-06 18:36:11 +00:00
Anna Yeddi 39d02ec02f Bug 1884970 - Close current tab button is missing an accessible name and role. r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson,flod
The [tab-close-button](https://searchfox.org/mozilla-central/rev/f9157a03835653cd3ece8d2dc713a782b7e4374e/browser/base/content/tabbrowser-tab.js#40) is not labeled and is missing an interactive role of button, while it is functioning as one.

Note: we do not want this control to be keyboard focusable, because keyboard-only user could close the tab via the context menu and we don't want to create an additional tab stop for the navigation as well, but making sure the control is marked up as a button with an accessible name would allow it to be actionable with speech-to-text software, with touch devices, with switch controls in scan mode, and for screen readers via their navigation shortcuts as well.

Differential Revision: https://phabricator.services.mozilla.com/D204413
2024-08-06 13:51:06 +00:00
Otto Länd d148733a9d Bug 1905211: apply code formatting via Lando
# ignore-this-changeset
2024-08-05 02:58:07 +00:00
James Teh b453f2a8d5 Bug 1905211 part 10: Expose target text as an a11y text attribute. r=morgan
This is now simply a matter of leveraging the work in the previous patches to support the new selection type and map it to the correct attribute.
There isn't an IAccessible2 or ATK attribute for this yet.
We use mark:true, based on <mark> and role="mark" which is used for a semantic highlight.
I've discussed this with Google, NV Access and Vispero and they all seem to be happy with this.

Differential Revision: https://phabricator.services.mozilla.com/D217071
2024-08-05 02:54:38 +00:00
James Teh 6652c8aa0d Bug 1905211 part 9: Add urlSuffix parameter to addAccessibleTask. r=morgan
We need this for the text fragment tests to load the page with an initial fragment.

Differential Revision: https://phabricator.services.mozilla.com/D217070
2024-08-05 02:54:38 +00:00
James Teh 7e1187c9e6 Bug 1905211 part 8: Move code to check whether text attribute ranges match out of browser_text_spelling.js and generalise it for use with other attributes. r=morgan
We will need this for the text fragment tests.

Differential Revision: https://phabricator.services.mozilla.com/D217069
2024-08-05 02:54:38 +00:00
James Teh 38e692da86 Bug 1905211 part 7: Notify accessibility about ranges that are added or removed from selections. r=smaug,morgan
nsISelectionListener isn't sufficient because it only notifies that the selection has changed.
A11y needs to know specifically which ranges were added or removed.
Previously, we handled this specifically for spelling errors in mozInlineSpellChecker.
That code has been removed and replaced with a more general approach.

Since we now have these notifications, rather than using nsISelectionListener just to fire events, we now use these notifications for that as well.
This avoids the need to add additional nsISelectionListeners, which would get messy particularly for custom highlights where there can be an arbitrary number of selections at any given time.

Differential Revision: https://phabricator.services.mozilla.com/D217068
2024-08-05 02:54:37 +00:00
James Teh f3241d83cf Bug 1905211 part 6: Adjust names and comments to reflect that this code can now be used for more than spelling errors. r=morgan
There should be no functional change here.

Differential Revision: https://phabricator.services.mozilla.com/D217067
2024-08-05 02:54:37 +00:00
James Teh 8548fd59ea Bug 1905211 part 5: Generalise the a11y spelling error code to support multiple selection types. r=morgan
Previously, this code was specifically tied to the spell check selection.
Actually adding more selection types will come in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D217066
2024-08-05 02:54:36 +00:00
James Teh 146a1d8e33 Bug 1905211 part 4: Use TextOffsetAttribute for spelling errors. r=morgan
An array of ints is fine for spelling errors, but we need to support multiple attributes like this.
We could use an array of ints for each attribute and search each one, though that would require more work in the parent process.
Also, custom highlights can have multiple selections for a single highlight type.
This would be rather messy with int arrays, especially where multiple selections span beyond the Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D217065
2024-08-05 02:54:36 +00:00
James Teh 853bc7d6f2 Bug 1905211 part 3: Introduce TextOffsetAttribute struct and support it as a serialisable attribute value. r=morgan
See the code comments for details.
We will soon use this for spelling errors, etc.

Differential Revision: https://phabricator.services.mozilla.com/D217064
2024-08-05 02:54:36 +00:00
James Teh 84a6fe08c4 Bug 1905211 part 2: Use AbstractRange instead of nsRange for a11y spelling error code. r=morgan
This doesn't matter for spelling errors.
However, we will soon generalise this code for use with other attributes like this.
In particular, custom highlights require us to use AbstractRange.
While we aren't supporting custom highlights in this bug, it is more effective to do this as part of this major refactor rather than doing another refactor later.

Differential Revision: https://phabricator.services.mozilla.com/D217063
2024-08-05 02:54:35 +00:00
James Teh e71347a74f Bug 1905211 part 1: Remove unnecessary script load in browser_text_spelling.js so that it can actually run. r=morgan
This test is disabled on CI because it's a bit fragile and we've never been able to work out how to fix that.
However, it's still useful locally.
Unfortunately, because it's disabled on CI, this problem wasn't caught when tests were moved around.

Differential Revision: https://phabricator.services.mozilla.com/D217062
2024-08-05 02:54:35 +00:00
Masayuki Nakano 33a24a0600 Bug 1909577 - Make some `nsFocusManager::GetFocusedElement()` users use its static version instead r=emilio,credential-management-reviewers,issammani
Now, we have `nsFocusManager::GetFocusedElementStatic()` which returns focused
element if the `nsFocusManager` instance is available.  Therefore, if
`nsFocusManager::GetFocusedElement()` users do not use other methods of
`nsFocusManager`, they can use `nsFocusManager::GetFocusedElementStatic()` and
make themselves simpler.

Note that some callers return early if `nsFocusManager` is not available, but
they do not return error and `nsFocusManager` instance is available in most
time of the life time of the process.  Therefore, we can simply stop using the
early return.

Differential Revision: https://phabricator.services.mozilla.com/D217527
2024-07-25 00:33:58 +00:00
Moritz Beier 3e5fce6039 Bug 1863530 - Remove browser.search.widget.inNavBar pref. r=dao,settings-reviewers,search-reviewers,omc-reviewers,urlbar-reviewers,Gijs,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D215607
2024-07-23 17:29:00 +00:00
Emilio Cobos Álvarez b03f9d79e0 Bug 1909311 - Remove nsIFormControlFrame and nsITextControlFrame. r=masayuki,layout-reviewers,dholbert
It's a rather useless interface:

 * nsITextControlFrame is only implemented by nsTextControlFrame, so we
   can just use that.
 * nsIFormControlFrame had very few actual functionality, mostly
   scattered around:
    * SetFormProperty(select) was only useful for nsTextControlFrame.
    * SetFormProperty(value) was only called on file controls.
    * SetFocus() did mostly nothing, or things that can be done in
      ElementStateChanged instead.

There are some do_QueryFrame calls that I replaced for better checks in
font inflation and nsIFrame, but I'll adjust to preserve behavior if you
insist (it just such a somewhat-random check).

Differential Revision: https://phabricator.services.mozilla.com/D217322
2024-07-23 16:16:18 +00:00
Emilio Cobos Álvarez 436aae97d3 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 17:49:39 +00:00
Stanca Serban 00e6de8399 Backed out changeset 48baafc34055 (bug 1789166) for causing mochitests failures. CLOSED TREE 2024-07-20 18:43:13 +03:00
Emilio Cobos Álvarez 45d6f3f899 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 14:17:31 +00:00
Sylvestre Ledru 45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Eemeli Aro ee72adeb6a Bug 1907422 - Rename "click ancestor" as "clickAncestor". r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D216335
2024-07-15 04:46:18 +00:00
James Teh 7075505067 Bug 1901459 fixup: Cosmetic changes from code review that I applied locally and somehow neglected to push to Phabricator. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D216131
2024-07-11 23:28:17 +00:00
Masayuki Nakano 518f238fa3 Bug 1906015 - part 2: Make the most `do_QueryInterface` users for `nsIFormControl` use new getter methods r=smaug,credential-management-reviewers,sessionstore-reviewers,sclements
Unfortunately, the following QIs are still required.
https://searchfox.org/mozilla-central/rev/cbdfa503a87597b20719aae5f6a1efccd6cb3b7b/dom/html/nsIConstraintValidation.cpp#101,121

Depends on D215576

Differential Revision: https://phabricator.services.mozilla.com/D215577
2024-07-10 00:46:59 +00:00
James Teh 0f20901790 Bug 1901459 part 4: Implement ITextProvider::RangeFromChild. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D215760
2024-07-09 02:52:16 +00:00
James Teh ede1495f62 Bug 1901459 part 3: Implement ITextRangeProvider::GetChildren. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D215759
2024-07-09 02:52:16 +00:00
James Teh 2451b5f8bb Bug 1901459 part 2: Implement ITextRangeProvider::GetEnclosingElement. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D215758
2024-07-09 02:52:15 +00:00
James Teh 0c663df642 Bug 1901459 part 1: Correctly remove any globals in the a11y Python environment after each test. r=nlapre
First, previously, we were doing this in registerCleanupFunction, but this actually runs after the entire test file has finished, not each task.
We need this to happen after each task because some tasks might set Python globals which might interfere with other tasks.

Second, even when this did run previously, we didn't actually wait until it was complete.
runPython() is async, so we need to wait for the Promise to be fulfilled.

Third, if we had awaited this previously, we would have hung forever.
The Python runner wasn't sending a response when it finished the reset, so the JS code never knew when it had completed.
We now just send a return of None in this case to signal completion.

Differential Revision: https://phabricator.services.mozilla.com/D215757
2024-07-09 02:52:15 +00:00
Stanca Serban 9cefe2edad Backed out changeset 94a2d660b4c5 (bug 1822975) for causing browser_net_accessibility related devtools failures. CLOSED TREE 2024-07-03 00:05:37 +03:00
Gijs Kruitbosch 11b2bc1cb4 Bug 1822975 - clean up places that manually enable broader async stacks which is now the default in tests, r=devtools-reviewers,firefox-desktop-core-reviewers ,geckoview-reviewers,mconley,ohall
Differential Revision: https://phabricator.services.mozilla.com/D215204
2024-07-02 19:44:29 +00:00
Dão Gottwald 1c9dd74f04 Bug 1905311 - Move / remove the rest of browser/base/content/browser.css. r=desktop-theme-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D215190
2024-07-01 09:27:17 +00:00
James Teh 154b408813 Bug 1905021: Don't incorrectly treat the start of a node inside a contentEditable as the end of a line. r=nlapre
Previously, we assumed that CaretAssociationHint::Before always meant the caret was at the insertion point at the end of a line.
However, it can also mean that the caret is before the start of a node in the middle of a line.
To fix this, we need to check for line and paragraph boundaries.
See the code comments for details.

I moved this functionality completely out of HyperTextAccessible and into TextLeafPoint.
First, it was easiest to do these checks with private functions already available to TextLeafPoint.
Second, this ideally belongs in TextLeafPoint anyway; its existence in HyperTextAccessible was vestigial.

Differential Revision: https://phabricator.services.mozilla.com/D215089
2024-07-01 06:24:13 +00:00
acseh e74b86533c Backed out changeset a5ff95602119 (bug 1905021) as requested for causing accessibility crashes related to selection a=backout 2024-07-01 00:35:00 +03:00
James Teh d8571e7f91 Bug 1905065: Add test. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D215179
2024-06-28 23:31:05 +00:00
James Teh 08e5d9edbe Bug 1905021: Don't incorrectly treat the start of a node inside a contentEditable as the end of a line. r=nlapre
Previously, we assumed that CaretAssociationHint::Before always meant the caret was at the insertion point at the end of a line.
However, it can also mean that the caret is before the start of a node in the middle of a line.
To fix this, we need to check for line and paragraph boundaries.
See the code comments for details.

I moved this functionality completely out of HyperTextAccessible and into TextLeafPoint.
First, it was easiest to do these checks with private functions already available to TextLeafPoint.
Second, this ideally belongs in TextLeafPoint anyway; its existence in HyperTextAccessible was vestigial.

Differential Revision: https://phabricator.services.mozilla.com/D215089
2024-06-28 23:30:08 +00:00
James Teh c3b181bc19 Bug 1901457 part 6: Raise UIA Text TextSelectionChanged and TextChanged events. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D214346
2024-06-26 10:15:45 +00:00
James Teh 83137ab39e Bug 1901457 part 5: Implement ITextProvider::GetSelection. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D214345
2024-06-26 10:15:45 +00:00