Closed Bug 1901458 Opened 2 years ago Closed 2 years ago

[UIA] Support querying plain text in documents

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED DUPLICATE of bug 1901456

People

(Reporter: Jamie, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 1901456 implements support for querying text in text boxes. Clients also need to be able to query text anywhere in the document. This will involve supporting ITextProvider on documents, as well as teaching our ITextRangeProvider implementation not to restrict to text boxes when the range was constructed from the document.

When working on this, a test needs to be added for SupportedTextSelection with CSS user-select: none.

(In reply to James Teh [:Jamie] from comment #0)

as well as teaching our ITextRangeProvider implementation not to restrict to text boxes when the range was constructed from the document.

It turns out that I'm wrong about this. The UIA documentation on this is somewhat confusing and inconsistent. It says this:

Objects backed by the same text store as their container are referred to as "compatible" embedded objects. These objects can be TextPattern objects themselves and, in this case, their text ranges are comparable to text ranges obtained from their container. This enables the providers to expose client information about the individual TextPattern objects as if they were one, large text provider.

But later, it says this:

For embedded TextPattern objects, the Document unit only recognizes the content contained within that element.

If the ranges are the same, that's not possible, since otherwise there would be confusion about what ExpandToEnclosingUnit(TextUnit_Document) means. If the range moved outside of its original element and then back inside, should it expand to the element or the entire document?

It seems both Microsoft Word and Edge implement this such that the Document unit is the entire document, regardless of which element the range was retrieved from. So I think we should do the same. I don't really agree with this, but apparently this is what Microsoft wants.

On the flip side, this makes our code simpler and actually means we can just roll this into bug 1901456.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1901456
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.