#19222: labels for accessibility cannot be associated with wxSpinCtrlDouble
---------------------------+--------------------
Reporter: lukaszgo1 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 3.0.5
Keywords: Accessibility | Blocked By:
Blocking: | Patch: 0
---------------------------+--------------------
Currently it is impossible to associate a label with wxSpinCtrlDouble in a
way which is recognized by screen readers on Windows. The problem can be
reproduced as follows:
1. Start the attached sample (I've used wxPython here since it was just
easier)
2. Run [
https://docs.microsoft.com/en-us/windows/win32/winauto/inspect-
objects Accessibility Inspect], ensure that in the Options menu MSAA mode
is checked and explore hierarchy of the accessible objects in the sample
applications started in step 1.
3. Verify that wxSpinCtrl is properly labeled whereas for
wxSpinCtrlDouble name is none.
4. Compare the way in which objects are placed for a standard wxSpinCtrl
and for a wxSpinCtrlDouble.
The reason why wxSpinCtrlDouble has no accessible name even though there
is the static text with the label to its left is because of the additional
window with the role ROLE_SYSTEM_CLIENT named "wxSpinCtrlDouble" which
encloses both the edit field and the spinbox. When accessed via MSAA edit
fields attempts to retrieve their name from their parent by asking about
the static text directly to the left which in this case does not exist.
Furthermore it is impossible to workaround that using wxAccessible. I'm
pretty sure that if not for this additional panel which encloses both edit
field and the spinBox the label would be properly picked up.
In much older version of wxPython 2.9.5 in which there is no panel and
both edit field and the spinBox are direct descendants of the main window
wxSpinCtrlDouble can be properly labeled.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/19222>