Closed Bug 1901456 Opened 1 year ago Closed 1 year ago

[UIA] Support for querying plain text

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

This work will lay the foundations for supporting the UIA Text and TextRange patterns. This will involve the following:

  1. Create a new object for UIA text ranges which can be constructed with a TextLeafRange and includes stubs for the ITextRangeProvider methods.
  2. A strong reference cannot be held to a TextLeafRange. Therefore, add code to store and retrieve it.
  3. Create a class to implement ITextProvider, inherited into ia2AccessibleHypertext. Support it only on editable text boxes for now and implement only ITextProvider::get_DocumentRange, with stubs for the other methods.
  4. Implement ITextRangeProvider::GetText.
  5. Implement ITextRangeProvider Clone, Compare, CompareEndpoints, ExpandToEnclosingUnit, Move, MoveEndpointByRange AND MoveEndpointByUnit. The Move and Expand methods should be restricted to the containing text box.
Blocks: 1901457
Blocks: 1901458
Blocks: 1901459
Blocks: 1901461
Blocks: 1901462
Blocks: 1901463
Blocks: 1901464
Blocks: 1901465
Blocks: 1901466
Blocks: 1901467
No longer blocks: 1901467

The root start and end points will later be used to restrict movement within the Accessible exposing the Text pattern from which the range was created.

Unfortunately, this can't be usefully tested without implementing another method, so tests will come in the next patch.

This will be needed for the Compare, CompareEndpoints and MoveEndpointByRange methods.

Duplicate of this bug: 1901458

I'm rolling documents into this as well. See bug 1901458 comment 2 for details.

Summary: [UIA] Support for querying plain text boxes → [UIA] Support for querying plain text
Attachment #9408346 - Attachment description: Bug 1901456 part 2: Store and reconstitute the root Accessible and TextLeafRange in UiaTextRange using MsaaAccessible strong references. → Bug 1901456 part 2: Store and reconstitute the TextLeafRange in UiaTextRange using MsaaAccessible strong references.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc3cc31ee8f7 part 1: Add stub ITextRangeProvider implementation. r=nlapre https://hg.mozilla.org/integration/autoland/rev/b3c3b5cc473e part 2: Store and reconstitute the TextLeafRange in UiaTextRange using MsaaAccessible strong references. r=nlapre https://hg.mozilla.org/integration/autoland/rev/a50db51f3a76 part 3: Implement ITextProvider::get_DocumentRange for editable text controls, with stubs for the other ITextProvider methods. r=nlapre https://hg.mozilla.org/integration/autoland/rev/afaeb26a2c16 part 4: Implement ITextRangeProvider::GetText. r=nlapre https://hg.mozilla.org/integration/autoland/rev/eae561f4bb0a part 5: Provide a way to safely get a TextLeafRange from an ITextRangeProvider pointer provided by a client. r=nlapre https://hg.mozilla.org/integration/autoland/rev/7f421023d32a part 6: Implement ITextRangeProvider Clone, Compare, CompareEndpoints, ExpandToEnclosingUnit, Move, MoveEndpointByRange AND MoveEndpointByUnit methods. r=nlapre
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: