This revision implements supportable styles covered by
UIA_StyleIdAttributeId. Namely, this includes the heading levels,
quotes, and emphasis. These are implemented with Accessible role checks.
To get the levels, this revision makes GetLevel a public function. It
also adds constant definitions for MinGW builds. Finally, this revision
adds tests to the existing GetAttributeValue tests.
Differential Revision: https://phabricator.services.mozilla.com/D229082
This revision implements RangeFromPoint by hittesting the screen location with
ChildAtPoint. Though the UIA documentation suggests that it may be correct to
find the closest text leaf to the screen coordinate, this revision restricts the
search to nodes under the screen coordinate directly. To accomplish this, it
creates two new functions: TextLeafPointAtScreenPoint, which manages the logic for
hit testing within a TextLeafRange, and FromAccessible, which creates a
TextLeafRange spanning the entire text leaf. Finally, this revision adds Windows
platform tests for the new functionality.
Differential Revision: https://phabricator.services.mozilla.com/D221902
Previously, TextLeafPoint::GetCaret() returned a placeholder representation of the caret.
ActualizeCaret() was then used to get the real caret position, optionally adjusting for the line end depending on the caller's needs.
This causes problems when we need to store the TextLeafPoint information in a UIA text range object because the only way to indicate the line end insertion point is to use the GetCaret() placeholder, but that also means the stored position changes if the caret moves.
For example, if you disabled NVDA's "caret moves review cursor" setting and then moved the caret, the review cursor should stay at the old position, but it didn't previously.
To fix this:
1. TextLeafPoint now has a new mIsEndOfLineInsertionPoint flag which is set to true by GetCaret() if appropriate.
2. GetCaret() sets mAcc and mOffset immediately, rather than needing to call ActualizeCaret() later.
3. TextLeafPoint methods still need to adjust the point to correctly handle the line end insertion point in some cases, but that is now handled by the private TextLeafPoint::AdjustEndOfLine method.
4. FindBoundary now correctly returns the previous character/cluster when requested for this end of line insertion point. Strictly speaking, this bug always existed, but no existing callers ever triggered it.
Differential Revision: https://phabricator.services.mozilla.com/D214342
1. The ARIA role should take precedence over the HTML tag.
2. The ARIA region role should only be conditionally treated as a landmark. Use the Gecko role to determine this.
3. Change some other cases to use the Gecko role instead of directly checking the name for consistency and to avoid duplicated logic.
These fixes are tested in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D209099
1. The ARIA role should take precedence over the HTML tag.
2. The ARIA region role should only be conditionally treated as a landmark. Use the Gecko role to determine this.
3. Change some other cases to use the Gecko role instead of directly checking the name for consistency and to avoid duplicated logic.
These fixes are tested in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D209099
Previously, we did this for any focused, selectable item.
However, the ARIA spec says we should only do this for option, tab and treeitem.
In particular, we shouldn't do this for gridcell, as this can expose gridcells as selected when they aren't.
Differential Revision: https://phabricator.services.mozilla.com/D209132
This revision adds a utility function to find the nearest non-generic ancestor
for which a given predicate returns AncestorSearchOption::Found. The goal of
this function is to enable searching through ancestors, stopping when
appropriate. This is useful in a follow-up patch for finding requisite ancestors
of child role accessibility nodes.
Differential Revision: https://phabricator.services.mozilla.com/D205672
This revision implements the ARIA rowgroup role in Gecko. Previously, Gecko was
using roles::GROUPING for multiple types of groups and disambiguating them
in various places. This revision unwinds that while maintaining present
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D205671
This revision adds a utility function to find the nearest non-generic ancestor
for which a given predicate returns AncestorSearchOption::Found. The goal of
this function is to enable searching through ancestors, stopping when
appropriate. This is useful in a follow-up patch for finding requisite ancestors
of child role accessibility nodes.
Differential Revision: https://phabricator.services.mozilla.com/D205672
This revision implements the ARIA rowgroup role in Gecko. Previously, Gecko was
using roles::GROUPING for multiple types of groups and disambiguating them
in various places. This revision unwinds that while maintaining present
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D205671
Exactly what should be a control element on the web and what shouldn't isn't really documented anywhere.
So, this is a little based on ideas from Chromium and a little based on my own understanding of how this should ideally work.
This will definitely need to be tweaked as we further develop UIA.
For now, the primary aim is to avoid the performance cliff caused by the UIA -> IA2 proxy's suboptimal implementation of IsControlElement.
We map IsContentElement to IsControlElement, just as Chromium does.
Differential Revision: https://phabricator.services.mozilla.com/D202923
The ARIA spec requires that, for certain landmark roles with no author-specified
names, user agents must treat such elements as if no role had been provided.
This revision accomplishes that task by carving out an exception in
ARIATransformRole and ComputeARIARole for roles::FORM, similar to the existing
carveout for roles::REGION. This revision also implements a NameIsEmpty function
which is helpful for checking name emptiness (since we do this in a few places)
without leaving a "name" variable on the stack. Finally, this revision updates a
expected WPT failure (by removing it).
Differential Revision: https://phabricator.services.mozilla.com/D202778
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
Eventually, the bulk of this functionality should be moved to TextLeafRange.
In the meantime, let's get rid of the platform specific ugliness here.
Differential Revision: https://phabricator.services.mozilla.com/D185263
Eventually, the bulk of this functionality should be moved to TextLeafRange.
In the meantime, let's get rid of the platform specific ugliness here.
Differential Revision: https://phabricator.services.mozilla.com/D185263
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
get_selections is largely based on the old IAccessible2_3::get_selectionRanges method.
However, this makes use of HyperTextAccessibleBase::CroppedSelectionRanges, which didn't exist before.
It has also been updated to return IAccessibleText pointers as required by the new interface.
setSelections is entirely new, but relies on existing mechanisms to convert offsets and to add and remove selections.
Differential Revision: https://phabricator.services.mozilla.com/D185135
get_selections is largely based on the old IAccessible2_3::get_selectionRanges method.
However, this makes use of HyperTextAccessibleBase::CroppedSelectionRanges, which didn't exist before.
It has also been updated to return IAccessibleText pointers as required by the new interface.
setSelections is entirely new, but relies on existing mechanisms to convert offsets and to add and remove selections.
Differential Revision: https://phabricator.services.mozilla.com/D185135
This revision removes unnecessary include directives from cpp files in the
accessible/basetypes directory. These suggestions came from the Include What You
Use tool.
Depends on D182288
Differential Revision: https://phabricator.services.mozilla.com/D182397
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
with something that is much more similar to the native Pivot
interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.
Differential Revision: https://phabricator.services.mozilla.com/D181813
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
with something that is much more similar to the native Pivot
interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.
Differential Revision: https://phabricator.services.mozilla.com/D181813
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
with something that is much more similar to the native Pivot
interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.
Differential Revision: https://phabricator.services.mozilla.com/D181813
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
with something that is much more similar to the native Pivot
interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.
Differential Revision: https://phabricator.services.mozilla.com/D181813
This revision changes our focus event and anchor scroll handling to fire
scrolling start events for non-interactive targets, where "non-interactive" is
defined as "any generic, landmark, or region Accessible." This revision also
adds a test to verify that the scrolling start event is fired.
Differential Revision: https://phabricator.services.mozilla.com/D181329
1. nsAccUtils::DocumentFor might return null if the Accessible is being moved and a client queried it during the move.
2. ChildAtPoint might return null if the point can't be located at all.
Differential Revision: https://phabricator.services.mozilla.com/D181213