Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

How do I exposed to a UI Automation Client that an offset in my RichText editor contains a link?

$
0
0

How do I exposed to a UI Automation Client that an offset in my RichText editor contains a link?

I have a custom RichText editor in a C# WPF application.

What interface would expose such information? ITextRange? ITextRangeProvider?

When using a screen reader, I noticed when using WordPad if I up or down arrow to a line of text that contains "The search enginewww.bing.com" I will hear "The search engine linkwww.bing.com."  Notice the word "link" was added.

I would like to implement the same behavior in my custom RichText editor when navigating up and down by line.

When I right arrow through the text in WordPad, the screen reader does NOT speak "link" when the caret reaches the first "w" in "www.bing.com".

I would like to implement the speaking of "link" when the caret reaches the first character in the URL.

I assume the UIA client would call ITextRangeProvider.Move with TextUnit.Character when the user navigates with the left or right arrow keys.

Then through some other UI Automation means, the screen reader could determine there is a link at the TextRange.  How is this done?

I see the client can call ITextProvider.RangeFromChild which "Retrieves a text range enclosing a child element such as an image, hyperlink, or other embedded object."  Does the UIA client then iterate through the range and find the link? If so, is there an example on how to do so?


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>