I am implementing a custom textbox control using Windows Forms from the .NET Framework.
I see that I can create AccessibilityObjects that contain MSAA values such as Name, Role, Value, and a variety of states like focusable and selected.
These objects can have roles like text or caret, and can have children.
Can you tell me what a basic MSAA DOM should look like for a simple textbox that has a caret and some selected text?
I printed the hierarchy of AccessibilityObjects for a standard windows forms textbox, but it had no children and I did not see an object with the caret role.
I examined an existing Windows Forms textbox in the NVDA log viewer, which said:
DEBUG - editableText.EditableText._hasCaretMoved (06:40:57.660):
Caret move detected using bookmarks. Elapsed: 0 ms
I'm not sure what bookmarks are, but some other reading indicates that screen readers often just look for a blinking cursor to detect the caret. Is that what NVDA does?
How can I use the text and caret roles to get NVDA to understand the caret's current location, and to support selecting text?