Screen readers not reading field labels in wx python 4.0.4

Hello,
I’m new to WX Python.
I am totally blind, and use screen reading software. When building a GUI form with WX Python 4.0.4, I notice that screen readers aren’t reading the labels of my text control fields.
If I install one of the 4.1.0-dev builds, things work fine. Is there something I need to do to get 4.0.4 to read the labels the same way they are working in 4.1.0?
Version 4.0.4 was installed via pip.

I’m not aware of anything specific that would cause that kind of change between 4.0.x and 4.1.x, so it’s probably due to changes in the underlying wxWidgets library. If so, then there isn’t any way to get it working in 4.0.4.

I have some users using wxGlade with e.g. the NVDA screen reader on Windows.
With 32 bit Python 3.7 the wxPython versions from 4.0.4 to 4.0.7post2 are showing this problem.
4.0.3 is working, 64 bit is working as well.
I did not test 4.1.0.

@Robin: it would really be good to have an accessible up-to-date non-dev build. I just got another bug report on this.

It’s not too hard to verify. Verification can be done on a 64 bit Windows as well.
NVDA is available for download, but you can check as well with inspect.exe.
I think this is available with Windows or Visual Studio by default.
I have it on my harddisk at “C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86\inspect.exe”
There seem to be multiple versions, but not all seem to work. For this purpose it does not matter whether it’s the x86 or x64 version.

See the attached sample.
Accessibility.py (1.4 KB)

When you run it and place the mouse pointer over the three widgets you should get:

  • Name: “My Checkbox” (on both the checkbox and the label)
  • Name: “My Toggle Button”
  • Name: “My Button”

This is an example with 32 bit version 4.0.3 on Python 3.7 where everything is fine:
(the right part of the image is from inspect.exe)

With 4.0.7post2 you’ll get this:

  • Name: “check” (on both the checkbox and the label)
  • Name: “check”
  • Name: “My Button”

I’m working on getting a 4.1 release ready to go in the next few days.

The “check” looks like the default name of the widgets. If you use the name="..." parameter when creating the widgets then you’ll likely see those names instead. Maybe setting both the label and the name would be a good idea for wxGlade, so both cases are covered?

Thanks.
The name argument would fix it. So the affected build versions don’t set the default argument to the label?

This affects all wxPython applications and personally I would not want to change thousands of occurences because the default handling changed on a certain combination of revision+platform…

P.S.: For wxGlade I have added a warning now to the accessibility options dialog.