winforms icon indicating copy to clipboard operation
winforms copied to clipboard

ComboBox raises selection property change even though it does not support the selection provider.

Open Tanya-Solyanik opened this issue 2 years ago • 1 comments

ComboBox AccessibleObject raises ElementSelected property change event, however this control does not support the SelectionProvider. Docs specify this event/provider combination as required.

Result: Accessibility clients don't listen to events associated with this provider. Specifically, NVDA does not listen to it, resulting in compliance issue in VS property pages.

We can't remove this event because other clients are likely to rely on it. However, we can implement the missing pattern.

The same issue is present on .NET Framework 481,

Note: This bug was discovered while testing VS property pages under NVDA. Because winforms ComboBox does not report Selection provider as supported, NVDA is not listening to selection change event. From @rperez030

I had a chat with an NVDA developer yesterday, and he pointed me to the place in the source code where they are registering the elementSelected event. He believes it may not require any work on NVDA's site for it to work once the control exposes the proper patterns.

Tanya-Solyanik avatar Sep 13 '22 00:09 Tanya-Solyanik

From ComboBox docs:

ISelectionProvider — Displays the current selection in the combo box. Support for the Selection control pattern is delegated to the list box beneath the combo box, but may not always be feasible.

And the child list box actually supports the selection pattern. A screenshot of a form with ComboBox and Accessibility Insights app showing that the child ListBox inside the ComboBox has support for ISelectionProvider

So it looks like we're doing it correctly on our side.

dmitrii-drobotov avatar Sep 15 '22 17:09 dmitrii-drobotov

Makes sense, thank you for the investigation.

Tanya-Solyanik avatar Nov 17 '22 20:11 Tanya-Solyanik