Return wxACC_NOT_IMPLEMENTED from wxWindowAccessible::GetParent()

If a widget has a custom accessibility implementation derived from
wxWindowAccessible, there's no guarantee that the parent overrides the
nullptr-returning base CreateAccessible.

Returning wxACC_NOT_IMPLEMENTED follows the pattern of other
accessibility methods to defer to the platform's default implementation,
and fixes wx wxWindowAccessible::GetParent() when called on custom
accessibility implementations like wxCheckListBoxAccessible.

Closes #26063.
This commit is contained in:
Glen Gordon
2026-01-02 17:37:16 +01:00
committed by Vadim Zeitlin
parent c8880e21b1
commit aaa151f5c7
+1 -1
View File
@@ -3955,7 +3955,7 @@ wxAccStatus wxWindowAccessible::GetParent(wxAccessible** parent)
if (*parent)
return wxACC_OK;
else
return wxACC_FAIL;
return wxACC_NOT_IMPLEMENTED;
}
}