Winforms: Accessibility [Inspect]: Cannot find the RichEdit control of the "Text" property in UIA structure of a PropertyGrid control

Created on 13 Jan 2020  路  4Comments  路  Source: dotnet/winforms

  • .NET Core Version:

    .NET Core 5.0.0-alpha.1.19564.1 (also reproduces in earlier versions of .NET Core WinForms.

  • Have you experienced this same bug with .NET Framework?:
    Yes

Problem description:


The issue is that RichEdit control is not shown in the UIA hierarchy of PropertyGrid control children.

image

Expected behavior:
RichEdit control (when shown) should appear in the PropertyGrid control's children hierarchy.

Minimal repro:

  • Create WinForms app with PropertyGrid and Button control.
  • Associate the button with PropertyGrid as a selected object.
  • Run the app, type something in the RichEdit control control (this is a button's text input control) and inpsect the button with the Inspect tool. Observe that the input is not in the UIA hierarchy.
tenet-accessibility

Most helpful comment

Thank you for the points @merriemcgaw and @weltkante ! The solution works for all drop-down editors. But popup inner accessibility and accessible hierarchy is the responsibility of editor's developer.

All 4 comments

Does this work for other popup/dropdown editors in the property grid? (Control editors, including custom editors, have the option to opt-in into either a dropdown or a popup.) If the problem isn't just isolated to RichTextBox it might be worth looking for a general solution so user defined editors can also profit from the solution.

If the solution to this accessibility issue requires certain code in the editor itself it might be worth documenting it, so programmers of user-defined editors can also solve this problem for their own editor implementations.

That's a great point @weltkante. I _think_ this works as expected for the other editors. @M-Lipin can you confirm?
If there's something specific we did to get those to work that we missed with this one; we should add that note to the docs.
I've got an accessibility samples and documentation project simmering on a back burner that may be coming up one of these days :)

Thank you for the points @merriemcgaw and @weltkante ! The solution works for all drop-down editors. But popup inner accessibility and accessible hierarchy is the responsibility of editor's developer.

Verified the issue with latest .NET 5.0.100-rc2.20459.18 from RC2 branch, it is fixed. Now RichEdit control (when shown) appears in the PropertyGrid control's children hierarchy.
Untitled

Was this page helpful?
0 / 5 - 0 ratings