Don't create wxWindowAccessible by default

Don't unconditionally use wxWidgets' implementation of IAccessible for
all windows when wxUSE_ACCESSIBILITY is 1, because it is inferior to the
system provided one: it often lacks appropriate labels, doesn't fully
support navigation and wxIAccessible isn't fully implemented.

The approach, when using MSAA, recommended by Microsoft documentation is
to customize accessibility for custom controls only, by proxying to the
standard and overriding what is necessary. By making this change, user
code is still allowed to customize accessibility if needed, without
negatively impacting standard controls that don't need any custom code.

See also https://github.com/wxWidgets/wxWidgets/pull/340
This commit is contained in:
Václav Slavík
2016-11-20 17:35:32 +01:00
committed by GitHub
parent 9c1689b850
commit 7dab555f71
3 changed files with 7 additions and 8 deletions

View File

@@ -1449,7 +1449,7 @@ public:
// ----------------------
#if wxUSE_ACCESSIBILITY
// Override to create a specific accessible object.
virtual wxAccessible* CreateAccessible();
virtual wxAccessible* CreateAccessible() { return NULL; }
// Sets the accessible object.
void SetAccessible(wxAccessible* accessible) ;
@@ -1457,7 +1457,8 @@ public:
// Returns the accessible object.
wxAccessible* GetAccessible() { return m_accessible; }
// Returns the accessible object, creating if necessary.
// Returns the accessible object, calling CreateAccessible if necessary.
// May return NULL, in which case system-provide accessible is used.
wxAccessible* GetOrCreateAccessible() ;
#endif