For spinbutton, the spec says there should be "no value" for all of these.
Importantly, this prevents the incorrect value of "50" being reported for ARIA spinbuttons with no value.
Differential Revision: https://phabricator.services.mozilla.com/D159924
HTMLComboboxListAccessible::SelectedOption can return null, so we need
to prepare for that. Same with HTMLComboboxListAccessible::List when
the combo box's child is removed.
Differential Revision: https://phabricator.services.mozilla.com/D159961
These don't work on emulated flexbox. We only have a couple of uses.
See D159726 for the diagnostic patch I used to catch these.
Differential Revision: https://phabricator.services.mozilla.com/D159727
Previously, we were inconsistent in what we treated as a table row in various places.
This caused breakage after bug 1726124, since nsAccUtils::TableFor() started returning a table when an ARIA row had an invalid parent, but Filters::GetRow wouldn't find such a row
This was causing broken expectations (and consequently, an extremely long loop) in TableCellAccessible::PrevColHeader.
To fix this, avoid creating an ARIARowAccessible (and thus ARIAGridCellAccessibles) if the row's parent isn't valid.
This way, there aren't conflicting expectations because the TableCellAccessible code can never run.
Furthermore, clients don't get a broken table cell interface on invalid cells, which was a problem even before bug 1726124.
Differential Revision: https://phabricator.services.mozilla.com/D159679
These don't work on emulated flexbox. We only have a couple of uses.
See D159726 for the diagnostic patch I used to catch these.
Differential Revision: https://phabricator.services.mozilla.com/D159727
ATK expects row, col, but RemoteAccessible previously expected col, row.
The ATK code was passing row, col, thus querying the wrong cell.
To make things more confusing, PDocAccessible specified row, col, even though DocAccessibleChild and RemoteAccessible specified col, row.
Fix this by making the order of the arguments consistent with ATK everywhere; i.e. row, col.
Differential Revision: https://phabricator.services.mozilla.com/D159239
We'd like to provide NODE_CHILD_OF and NODE_PARENT_OF relations in the parent
process, relying on cached information, to avoid sync IPDL messages. This
revision implements most of the use cases for this relation for remote
accessibles, notably setting aside handling of MathML's <mroot> parent/child
relation. ARIA trees, treegrids, lists, and so on are handled in the remote
accessible largely identically to how they were handled in LocalAccessible.
Rather than define a new rule for walking the tree to find children, this
revision unifies the ItemIterator so it works on generic Accessibles, and uses
it in RemoteAccessibleBase the same way it's used in LocalAccessible. The
special case carve-out for MSAA clients now exists as a simpler IsTopLevel
check in DocAccessibleParent.
Differential Revision: https://phabricator.services.mozilla.com/D159452
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.
Add stderr output to Accessible::DebugPrint in Android as well.
Differential Revision: https://phabricator.services.mozilla.com/D157528
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.
Add stderr output to Accessible::DebugPrint in Android as well.
Differential Revision: https://phabricator.services.mozilla.com/D157528
This revision modifies aspects of AccAttributes to make them a bit easier to
work with from a developer perspective. One big win here is the removal of
SFINAE logic that prunes the overload set when resolving calls to SetAttribute.
That logic, plus the other overloads of SetAttribute, have been translated
fairly directly into if constexpr blocks in a single SetAttribute
implementation. The upshot of this is that we can now explicitly disallow
people, at compile time, from accidentally making string copies when passing
strings to SetAttribute, with a nice error message! This revision also enables
us to use AccAttributes in a read-only fashion, particularly in range-based for
loops. This revision accomplishes that by adding const wherever is reasonable.
Next, this revision also removes some redundant special member function
definitions (deletions). My hope is that these changes will generally make
AccAttributes easier to use as safely as possible. Finally, this revision
updates a couple places where we use AccAttributes in a read-only way such
that they use the new const mechanisms.
Differential Revision: https://phabricator.services.mozilla.com/D158995
NextSibling uses IndexInParent, which is currently slow for RemoteAccessible.
Even if IndexInParent were faster, we're iterating all children here, so doing it this way is more efficient regardless.
This results in a significant performance improvement (> 25x) with NVDA when thousands of HTML select options are shown.
Differential Revision: https://phabricator.services.mozilla.com/D159149
We first retrieve accessible bounds and then pass them to a content task to compare against content layout bounds. We are not guaranteed to have the cache in sync in that manner, most tests will wait for a content rAF but that is not sufficient for the parent cache's state.
Instead we need to pull the content layout bounds (since those are guaranteed to be in sync via rAF) into parent and then wait for the a11y cache to catch up.
Differential Revision: https://phabricator.services.mozilla.com/D159080
Diffing text can make for confusing screen reader readouts in live regions. To
address this, this revision causes gecko to avoid sending update events for
solely the diff. Instead, gecko will now send a text update event that causes
us to re-read the entire text node. This brings us in line with Chrome.
Notably, if the text is editable, we'll continue to diff as usual to avoid
clients reading too much text on each edit.
Differential Revision: https://phabricator.services.mozilla.com/D158822
These should never be out of sync.
Previously, they could be out of sync for an ARIA table with display: contents, since we don't create an ARIAGridAccessible in that case (bug 1494196).
While that incorrect creation is itself a bug that we should fix, I don't want to deal with that here.
Instead, don't check ARIA generic types in Accessible::IsTable, only the class generic types, as we already do for IsTableCell.
This fixes a crash in BundleFieldsForCache.
In addition, while the crash is fixed by the above change, as an optimisation, BundleFieldsForCache now just calls AsTable instead of calling IsTable first, since the IsTable call is redundant.
This second fix alone would be sufficient to fix the crash, but the first will catch other potential instances of this problem.
Differential Revision: https://phabricator.services.mozilla.com/D158548
1. When constructing a TextLeafPoint and searching for a leaf, do not descend inside an OuterDoc (iframe/browser).
Otherwise, we end up inside another document.
Other TextLeafPoint code avoids crossing document boundaries, so the constructor must do this too.
2. When searching for a leaf, include an OuterDoc, but don't walk inside it.
Previously, we skipped OuterDocs altogether.
This meant that if you started on an OuterDoc, walking backward and then forward by character would never return you to your origin.
Also, clients walking the document text shouldn't just skip iframes altogether, so exposing them as a single character makes more sense.
This fixes infinite loops in OffsetAtPoint when querying a container with an iframe at the end.
Differential Revision: https://phabricator.services.mozilla.com/D158740
We shouldn't expose the user-pass section of document URI to another apps since
it's sensitive data, but non-malicious a11y API users must not need it.
Additionally, `data` and `blob` URI may be too big (e.g., can be some mega
bytes) and they may need to allocate too big string multiple times in the heap
per URI. Therefore, the accessibility module should stop handling URI as-is if
the document URI is one of them.
Differential Revision: https://phabricator.services.mozilla.com/D158735