winforms
winforms copied to clipboard
ComboBox raises selection property change even though it does not support the selection provider.
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.
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.
So it looks like we're doing it correctly on our side.
Makes sense, thank you for the investigation.