Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screen reader support #317

Closed
adil-s opened this issue May 1, 2018 · 136 comments
Closed

screen reader support #317

adil-s opened this issue May 1, 2018 · 136 comments
Labels
accessibility enhancement New feature or request pending fix is in repository

Comments

@adil-s
Copy link

adil-s commented May 1, 2018

I have just download wx Glade and tried using it with NVDA (an open source screen reader) on windows 10. but the screen reader support was very poor. it feels like there is not any accessibility implementation.
if it is possible, I request you to add this feature.

  1. let screen reader speak out the coordinate, size and position of GUI element (text boxes, button, check box etc)
  2. keyboard support to move the GUI element
  3. keyboard support for resizing text boxes, buttons etc.
@DietmarSchwertberger
Copy link
Collaborator

I have just installed NVDA. I'm not sure how much such a visual tool like wxGlade can improve on accesibility.
Are you aware that wxGlade always uses sizers and so the positioning of elements can't be influenced directly? The design is always hierarchical. Personally, I'm using the tree view most of the time for editing.
Elements can be cut and pasted from one sizer slot to another.
The size can be set in a text box, if it should be different from the default of "-1,-1".

The main issues when starting seem to be:

  1. The buttons on the palette window are always just recognized as "button". The tooltip of the buttons are not recognized. Is there a way to attach a label to a bitmap button that NVDA would use it? It seems that e.g. status bar messages are not taken into account.
  2. In the properties window, only values are listed, not the labels.
  3. Keyboard navigation in the Properties and Palette windows should be improved, as using Tab does not really help here.
  4. Things like invalid names are indicated by background colours. When you don't see them, you will just notice the bell when leaving the input field again.

I'm currently changing the overall window layout from using 3 frames to a single frame with splitters. After that, I would also like to implement some more keyboard options. E.g. when an empty slot is selected, press '+' or something like that to add a widget.

@adil-s
Copy link
Author

adil-s commented May 2, 2018 via email

@DietmarSchwertberger
Copy link
Collaborator

Maybe you want to try text buttons. For this you would need to replace the function make_object_button in common.py with the code pasted below. The better solution would be if NVDA had an interface where wxGlade could send something like "about to select button 'TextCtrl'".
But still, this would probably not really fit your needs as the logic is "select the widget type then click on an empty slot in the Tree or Design window to place it". There's no way to avoid the mouse for now, except via copy and paste.

I'm currently re-designing wxGlade to use a single window with splitters instead of the three separate frames. Then I would also like to add a context menu and keyboard shortcut to add a widget into the currently selected slot (via a popup window). This would probably work better for you as you would not need to navigate too much between the windows. For this pop-up window, it's easier to switch to text buttons as it can occupy more space on the screen.

def make_object_button(widget, icon_path, toplevel=False, tip=None):
    if not config.use_gui: return None
    import wx
    import misc
    from tree import WidgetTree

    if not os.path.isabs(icon_path):
        icon_path = os.path.join(config.icons_path, icon_path)
    bmp = misc.get_xpm_bitmap(icon_path)
    tmp = wx.Button(palette, -1, widget)
    if not toplevel:
        tmp.Bind(wx.EVT_BUTTON, add_object)
    else:
        tmp.Bind(wx.EVT_BUTTON, add_toplevel_object)
    refs[tmp.GetId()] = widget
    if not tip:
        tip = _('Add a %s') % widget.replace(_('Edit'), '')
    tmp.SetToolTip(wx.ToolTip(tip))

    WidgetTree.images[widget] = icon_path

    return tmp

@DietmarSchwertberger
Copy link
Collaborator

P.S.: It's probably better, you search for this line:
tmp = wx.BitmapButton(palette, -1, bmp, size=(31, 31))

Then replace it with this one:
tmp = wx.Button(palette, -1, widget.replace('Edit', ''))

This will omit the redundant string 'Edit'.

@adil-s
Copy link
Author

adil-s commented May 3, 2018

thanks a lot! it works. I noticed those issues which you mentioned. but at least, now, I am able to design GUI. please let me know when you are done with modification of wxGlade.
if you can explain me then I would like to know what was the issue and how you fixed it by modifying make object function.
unfortunately, I am self learner therefore I have nobody to explain me what was going wrong there. you're awesome.
thankyou

@DietmarSchwertberger
Copy link
Collaborator

The make_object_button function is just a factory functions that builds a wx.BitmapButton with a bitmap. The modification uses a wx.Button, which just has a text label.
I will inform you when the modifications are in the repository. I'm currently re-working the keyboard handling.

I'm not sure how usable the Properties window is for you as NVDA does not know about the structure.
Depending on the type of property, the structures are e.g.:

  • Label + Checkbox
  • Label + Text or Spin or DropDown
  • Label + Checkbox + Text + Button
  • Box with Label + Checkboxes or Radio buttons

@adil-s
Copy link
Author

adil-s commented May 4, 2018 via email

@DietmarSchwertberger DietmarSchwertberger added the enhancement New feature or request label May 18, 2018
@vortex1024
Copy link

hello, I tried to do this also, got the buttons to speak their labels, but I can't place them on slots using the keyboard. I tried clicking the buttons then the slot, copy pasting and even simulating mouse dragging with the keyboard, nothing seemed to work. I'm running Version 0.9.1 on Python 2.7.16 and wxPython 4.0.4, win 10 x64.
Here's my makeObject function, maybe I replaced what I shouldn't have:
def make_object_button(widget, icon_path, toplevel=False, tip=None):
"""Creates a button for the widgets toolbar.

Function used by the various widget modules to add a button to the widgets toolbar.

Icons with a relative path will be loaded from config.icon_path.

widget: (name of) the widget the button will add to the app
icon_path: Path to the icon_path used for the button
toplevel: True if the widget is a toplevel object (frame, dialog)
tip: Tool tip to display

return: The newly created wxBitmapButton instance"""
if not config.use_gui: return None
import wx
import misc
from tree import WidgetTree

if not os.path.isabs(icon_path):
    icon_path = os.path.join(config.icons_path, icon_path)
bmp = misc.get_xpm_bitmap(icon_path)
if compat.version < (3,0):
    # old wx version: use BitmapButton
    #tmp = wx.BitmapButton(palette, -1, bmp, size=(31,31))
    tmp = wx.Button(palette, -1, widget.replace('Edit', ''))
    if not toplevel:
        tmp.Bind(wx.EVT_BUTTON, add_object)
    else:
        tmp.Bind(wx.EVT_BUTTON, add_toplevel_object)
else:
    if not toplevel:
        #tmp = wx.ToggleButton(palette, -1, size=(31,31))
        tmp = wx.Button(palette, -1, widget.replace('Edit', ''))
        tmp.Bind(wx.EVT_TOGGLEBUTTON, add_object)
    else:
        #tmp = wx.Button(palette, -1, size=(31,31))
        tmp = wx.Button(palette, -1, widget.replace('Edit', ''))
        tmp.Bind(wx.EVT_BUTTON, add_toplevel_object)
    tmp.SetBitmap( bmp )
refs[tmp.GetId()] = widget
if not tip:
    tip = _('Add a %s') % widget.replace(_('Edit'), '')
tmp.SetToolTip(wx.ToolTip(tip))

WidgetTree.images[widget] = icon_path

return tmp

Thanks

@DietmarSchwertberger
Copy link
Collaborator

I will have a look. Currently there is no way not to use the mouse.
Would the space bar be a good option? Or better Enter?
I'm just about the add a configuration option for the palette panel to display text instead of icons.

@DietmarSchwertberger
Copy link
Collaborator

DietmarSchwertberger commented Mar 20, 2019

Please check out the branch NEW_STRUCTURE.
In Edit->Preferences -> Tab "Interface" -> Box "Palette Panel":

  • uncheck "Show Icons"
  • check "Show labels"

This should enable text buttons instead of icons.
To "drop" widgets, hit the Enter button. To stop adding the same widget type, press Escape.

@vortex1024
Copy link

Great, it works! Since then, I found the problem in my code, I had to use ToggleButton instead of button and I made it work too, but it's better to be able to control it from config options.
Not sure if it should be talked about in this issue too, but I have another problem with wxGlade: my screen reader doesn't associate the static texts with the text controls, i.e. it doesn't see the link beetween a text ctrl and it's associated static text. I looked at the code and couldn't find out what's wrong.
Here's some code which does it correctly:
https://files.derekriemer.com/nvda/gui.guiHelper-pysrc.html#associateElements
Do you have any idea about what's wrong? Should I enable any properties to make it work? I tried using center vertical alignment like in the NVDA code, but it didn't work.
Thanks.

@DietmarSchwertberger
Copy link
Collaborator

DietmarSchwertberger commented Mar 25, 2019

The only thing that I see in your linked code is that always a spacer is placed between linked elements. This is not required or common, as usually a border is used for this.

wxGlade is a bit special when creating the labels in new_properties.Property._get_label:
It uses wx.lib.stattext.GenStaticText and explicitely sets the size for the text to have a vertical alignment.
Would the link work with wx.StaticText? If yes, then I would look why I was using wx.lib.stattext instead.

P.S.: I'm assuming you're talking about the Properties panel of wxGlade itself, not your code.

@vortex1024
Copy link

vortex1024 commented Mar 25, 2019 via email

@DietmarSchwertberger
Copy link
Collaborator

Probably NVDA is checking the IDs of the widgets and assumes a StaticText with ID x and a TextCtrl with ID x+1 to be linked. With the StaticText being created in do_layout, the IDs are no longer adjacent.
I don't like the separation of init, __set_properties and __do_layout and it's on my to-do list to modify the code generation.
(I don't like it as no human being would write such code.)

I don't have a time frame for this change yet.

@DietmarSchwertberger
Copy link
Collaborator

I have moved the new code generation to the top of my list.

@vortex1024
Copy link

vortex1024 commented Mar 25, 2019 via email

@DietmarSchwertberger
Copy link
Collaborator

I think something went wrong when posting or sending the comment...

@vortex1024
Copy link

oops, sorry about that. I was asking whether there is any issue I can subscribe to in order to get notified when you'll implement that. thanks.

@DietmarSchwertberger
Copy link
Collaborator

I will post it here.

@DietmarSchwertberger
Copy link
Collaborator

A very, very first version is online in the branch NEW_CODEGEN. Maybe it does work already for you.
There's still much work to do on this, though.

@adil-s
Copy link
Author

adil-s commented Mar 27, 2019

I'm trying out and I'll let you know how it goes!

@adil-s
Copy link
Author

adil-s commented Mar 27, 2019

Ok, I've checked out the new codegen branch. I'm able to add gui element and remove them easily.
I just check the any gui element by pressing space and then, press f2 and then, chose the desire slot where I want to add that vigit and then, I move my mouse cursor by pressing NVDA+SHIF+M
and then perform right click.
it got added!

right now, the windows that lets change the various property of any gui element is inaccessible. I. E. when I press F3 to go to properties, the fields name are not announced. NVDA just says, "edit "

@DietmarSchwertberger
Copy link
Collaborator

Instead of NVDA+SHIFT+M you should be able to add the widget to the slot by just hitting Enter.

With F3 you only get to the panel. You can then move on using Tab to move to a specific field or Ctrl-Tab/Ctrl-Shift-Tab to move to another notebook tab.
With Ctrl-M, -L, -W, -E, -D you can go to a specific notebook tab, if it's available. F8 to F12 are doing the same.

I also see that the "Name" in Windows Inspect is displayed for generated code now, but still not for wxGlade.
So in NVDA only 'edit' is displayed. That's something I don't understand. I also tried to call TextCtrl with the name argument, but no difference.

@DietmarSchwertberger
Copy link
Collaborator

DietmarSchwertberger commented Mar 27, 2019

OK, if I use a wx.StaticText instead of wx.lib.stattext.GenStaticText, then things are working.
I need to check why I went for GenStaticText.

P.S.: I think that on Windows I can use StaticText in new_properties.Property._get_label

@DietmarSchwertberger
Copy link
Collaborator

OK, I'm now using StaticText. It will take some time until I upload the commits as I need to do some more testing.

@vortex1024
Copy link

thanks, the generated UI's are now indeed being read by NVDA! The properties window doesn't worry me so much, as I can get to the corresponding label using object navigation. Rather, the thing concerning me is adding events. Pressing add or insert doesn't seem to trigger any UI action visible to NVDA, and it doesn't read that grid either. The only thing it does is show me an edit control when pressing space, but I don't know what to type into it.

@DietmarSchwertberger
Copy link
Collaborator

Grid is probably no Windows control, but something painted by wx itself.
The same is probably true for list controls. E.g. the menu or toolbar editor does use a list control.

For grid based properties like the Events, it would probably be possible to add an edit dialog to allow editing events line by line.

@vortex1024
Copy link

actually, the list in the toolbar editor seems to work, I guess it's a standard listbox control

@DietmarSchwertberger
Copy link
Collaborator

So, the best solution would probably be to add an option "Use list instead of grid".
With this active, the grid would be replace by two labels plus text controls at the top and a list control below.
This would lack the copy and paste options that the grid based properties currently support, though.

Unfortunately, the implementation of new_properties.GridProperty is a bit difficult to understand. So propably I need to implement the alternative list based property. I will put it on my list, but don't hold your breath. First I will finish the NEW_STRUCTURE and NEW_CODEGEN branches.

It's probably also time to add an "Accessability" tab in Preferences...

@DietmarSchwertberger
Copy link
Collaborator

@adil-s : I have just updated the tree navigation. When using the up/down arrow keys inside the tree widget, the nodes should no longer be expanded.
When navigating in the design window, they will still be expanded. I think that's a reasonable behaviour.

@adil-s
Copy link
Author

adil-s commented Apr 6, 2020

I've tested out the improvements and it works perfect. I think, now only the event editing needs little fixing.
when I'm trying to edit or remove the events, I can't select particular event from grid view.
I can't thank you enough!

@DietmarSchwertberger
Copy link
Collaborator

OK, the problems with events that I see:

  • Alt+R does not work in either the grid or the separator. I will look into this, but it's not really important. See below for the reason.
  • Enter will move to the next line if you're in the grid. This should not be an issue if you are using the Event and Handler text controls above the grid. After all that's what the accessibility option "Show editors for Grid Properties" is for.

Please note that currently there's no point in removing events. If you don't enter a handler name or delete the handler name, no handler will be created.
If you enter an event name, but no handler, it will not be saved.
When loading a file, all the default events will be there again, even if no handler name has been entered.

Removing will be more interesting in a future version where I plan that you can add e.g. all mouse events in one go. Then it will make sense to save events without handlers and to manually remove unused events.

What ist the situation with the palette when selecting the widget to add? You can focus it with F4, but you still need to move through the buttons all one after the other, right? Or does NVDA offer shortcuts here?

I could imagine that some of these options would improve situation a lot:

  • Move between the lines with up/down keys; within the lines with left/right or tab/shift+tab.
  • When hitting the upper/lower/left/right limit, give feedback with wx.Bell.
  • Maybe support hotkeys like W for "Windows", C for "Containers", B for "Buttons" and so on.

@adil-s
Copy link
Author

adil-s commented Apr 7, 2020

you're right about event editing.
improving the experience of adding widget with the shorcuts is the great idea. no, NVDA doesn't provide any shortcuts here. I have to tab through all the widgets to select desired one.

@DietmarSchwertberger
Copy link
Collaborator

I have just uploaded changes to implement basic keyboard navigation in the palette.
You can move around with the arrow keys, Home, End, Page Up, Page Down.
You will hear the bell if you hit the limits.
There are hotkeys W, C, B, I, N, D, T, M, R, S to directly move to the sections. These will change to the first column each.

Please try for a few days and give feedback whether the up/down navigation make sense as it is. It will currently remain in the column. E.g. down arrow will move from ToggleButton to Choice. I could change this to jump to the first column, i.e. TextCtrl.
Please give feedback whether you would prefer to keep the column number also for Page Up / Down.

Currently you have to use the mouse or the space bar to activate a button. I could change this such that Enter also does activate and at the same time jumps to the tree section.

I had a look also at the grid property editor for events etc.
This is a bit more work to get things right. So it will take some days.

@nick777999
Copy link

Sorry if this is a really long, but I hope it will be helpful.
I can confirmthat this issue still persists: see the conviguration environment below. from NVDA configuration I can see that NVDA pays attention to the name attribute of the element, also see the NVDA application logs below. It clearly states that the name attribute is Check, which is what it speaks.
python 3.6.2 on win 32
wxpython version: 4.0.7, also tested on version 4.0.4, issue persists in both of them. windows 10.
NVDA version: 2019.3.1
wxglade master, version 0.9.9 pre

NVDA log on a button which is read correctly: frame button.
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (22:30:14.712) - MainThread (3728):
Developer info for navigator object:
name: 'Frame'
role: ROLE_BUTTON
roleText: None
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.Button object at 0x00FC2C70>
Python class mro: (<class 'NVDAObjects.IAccessible.Button'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'object'>)
description: None
location: RectLTWH(left=105, top=85, width=88, height=26)
value: None
appModule: <'appModuleHandler' (appName 'python', process ID 4820) at address cb1790>
appModule.productName: 'Python'
appModule.productVersion: '3.6.2'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
windowHandle: 657346
windowClassName: 'Button'
windowControlID: -31948
windowStyle: 1442906113
extendedWindowStyle: 0
windowThreadID: 11164
windowText: 'Frame'
displayText: 'Frame'
IAccessibleObject: <POINTER(IAccessible) ptr=0x3467fd0 at 2683cb0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=657346, objectID=-4, childID=0
IAccessible accName: 'Frame'
IAccessible accRole: ROLE_SYSTEM_PUSHBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_DEFAULT, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048836)
IAccessible accDescription: None
IAccessible accValue: None

On another button that is labeled correctly: Dialog button
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (22:33:37.486) - MainThread (3728):
Developer info for navigator object:
name: 'Dialog'
role: ROLE_BUTTON
roleText: None
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.Button object at 0x0269A5B0>
Python class mro: (<class 'NVDAObjects.IAccessible.Button'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'object'>)
description: None
location: RectLTWH(left=195, top=85, width=88, height=26)
value: None
appModule: <'appModuleHandler' (appName 'python', process ID 4820) at address cb1790>
appModule.productName: 'Python'
appModule.productVersion: '3.6.2'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
windowHandle: 67590
windowClassName: 'Button'
windowControlID: -31947
windowStyle: 1442906113
extendedWindowStyle: 0
windowThreadID: 11164
windowText: 'Dialog'
displayText: 'Dialog'
IAccessibleObject: <POINTER(IAccessible) ptr=0x77f1618 at c4b440>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=67590, objectID=-4, childID=0
IAccessible accName: 'Dialog'
IAccessible accRole: ROLE_SYSTEM_PUSHBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_DEFAULT, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048836)
IAccessible accDescription: None
IAccessible accValue: None

The logs on the first checkbox in the interface:
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (22:36:13.298) - MainThread (3728):
Developer info for navigator object:
name: 'check'
role: ROLE_CHECKBOX
roleText: None
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.IAccessible object at 0x00F5D2F0>
Python class mro: (<class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'object'>)
description: None
location: RectLTWH(left=285, top=85, width=88, height=26)
value: None
appModule: <'appModuleHandler' (appName 'python', process ID 4820) at address cb1790>
appModule.productName: 'Python'
appModule.productVersion: '3.6.2'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
windowHandle: 67592
windowClassName: 'Button'
windowControlID: -31946
windowStyle: 1375801347
extendedWindowStyle: 0
windowThreadID: 11164
windowText: 'Panel'
displayText: 'Panel'
IAccessibleObject: <POINTER(IAccessible) ptr=0x5b6aec0 at 2683ad0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=67592, objectID=-4, childID=0
IAccessible accName: 'check'
IAccessible accRole: ROLE_SYSTEM_CHECKBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048580)
IAccessible accDescription: None
IAccessible accValue: None

The logs on the same checkbox, when checked:
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (22:38:44.723) - MainThread (3728):
Developer info for navigator object:
name: 'check'
role: ROLE_CHECKBOX
roleText: None
states: STATE_CHECKED, STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.IAccessible object at 0x0269AE90>
Python class mro: (<class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'object'>)
description: None
location: RectLTWH(left=285, top=85, width=88, height=26)
value: None
appModule: <'appModuleHandler' (appName 'python', process ID 4820) at address cb1790>
appModule.productName: 'Python'
appModule.productVersion: '3.6.2'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
windowHandle: 67592
windowClassName: 'Button'
windowControlID: -31946
windowStyle: 1375801347
extendedWindowStyle: 0
windowThreadID: 11164
windowText: 'Panel'
displayText: 'Panel'
IAccessibleObject: <POINTER(IAccessible) ptr=0x5a0ce08 at e31a80>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=67592, objectID=-4, childID=0
IAccessible accName: 'check'
IAccessible accRole: ROLE_SYSTEM_CHECKBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_CHECKED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048596)
IAccessible accDescription: None
IAccessible accValue: None

As we can see, on the labels that are beeing read out correctly, everyone of them have a name property set, so checkboxes should also have the name attribute set in order to make NVDA read it correctly. as I was developing my apps, static text elements are not beeing read by NVDA unless screen review mode is beeing used, you can't even focus them with NVDA if you really wanted to, unless you set focus programatically. So, it would be very appreciated if you set a name value on each checkbox that appears on interface.
Thanks again for all the effort that you put to make your product accessible. Hope my responses helped you,
Nick.

@DietmarSchwertberger
Copy link
Collaborator

Please try wxPython 4.0.3. At least for Python 3.7 32 bit that solved the problem.

There's not much that I could do on this. If you confirm that for Python 3.6 the problem is also solved by using 4.0.3, I will add at least a note to the accessibility configuration page.

I will also post on the related thread on wxPython discuss: https://discuss.wxpython.org/t/screen-readers-not-reading-field-labels-in-wx-python-4-0-4/34439/2

@nick777999
Copy link

hello! i will update my python installation and give it a try on at least python 3.7. i'll let you know how it goes. BEFORE that, i'll try to test a 4.0.3 of wxpython on the same installation of python.

@DietmarSchwertberger
Copy link
Collaborator

Leave Python 3.7. Just replace your wxPython with 4.0.3. That's less work and would be more interesting for me as it would make me more confident when adding a version check to wxGlade.

I've posted a detailed description on the wxPython discuss site. Maybe Robin finds the time to look into or maybe he just finishes 4.1 which also seems to fix the issue.

@nick777999
Copy link

Hello! I have tested the wxglade with wxpython 4.0.3 and, it works perfectly! The strange thing is, that the name attribute is beeing set automatically in 4.0.3, but issue persists in 4.0.4 and up. That is really strange. I have no idea what is the issue, but in fact, it works. It would be nice if someone there from wx community looks at this issue and fixes it in later versions.
Thanks,
Nick.

@nick777999
Copy link

BTW, probably a quick fix would be to package a whole project with pyinstaller and ship a wxpython 4.0.3 with it (just for ease of usability), or place this package in the project directory, because when a script tries to import it, it first will try to use the modules from the directory and then from the system directory. Besides, there is another option, to use virtualenv and install necessary version of wxpython in there and call wxglade from that environment. Once issue is fixed from wxpython side, this workaround will not be necessary anymore.

@DietmarSchwertberger
Copy link
Collaborator

I have added a warning to the accessibility dialog. A wxPython 4.1 version will be out in the next days.

Adding a name argument to all widgets would be a workaround, but I would not want to change thousands of occurences.

Creating installers is /not/ a quick fix. It's a major effort and there's no point to have incompatible wxPython versions.

@davidkreynolds
Copy link

Hi,
Not sure whether this is an accessibility issue, but:
I need to add a file open dialog to my form. Having looked through the WXPython manual, it looks like there are widgets for certain dialogs pre-defined. Are they available in WXGlade, if so, how can I access them. Perhaps this is a job I need to code by hand.

@DietmarSchwertberger
Copy link
Collaborator

At some point I may add support for a FilePickerCtrl, but this is a low priority (I never used this myself).
For wx.FileDialog there probably will be no support, as this is not a widget and needs to be called at an arbitrary point in the user code.

It would be nice to have some kind of wizard to generate code for FileDialog, DirDialog and MessageDialog, but it's unlikely that I will do this.

@DietmarSchwertberger
Copy link
Collaborator

In the last weeks I have updated the master thread a lot.
The updates are the base for a future 1.0 release. The changes are mainly internal to make the structure more maintainable and extensible. This needs a lot of testing on different platforms. On Windows I have not noticed problems.
The Class name, Base class and Instance class properties are slightly different and not yet finalized.

Right now I have also updated the grid property editor, i.e. the editor for e.g. Events, Notebook tabs etc.
The updates are mainly related to the accessibility option "Show editors for Grid Properties" and should improve the synchronisation between these editors and the associated grid control.
If you are very brave, you may start testing.

While collecting feedback and bug reports, my focus will be on updating the documentation and improving usability on some points.
Please give note if there are accessibility issues to be fixed or improved.

Please also give note if there are ways to improve the accessibility of the documentation, especially the screenshots. Do Alt-Texts help?
I need to renew the screenshots anyway.

Regards,
Dietmar

@davidkreynolds
Copy link

davidkreynolds commented Jul 28, 2020 via email

@DietmarSchwertberger
Copy link
Collaborator

DietmarSchwertberger commented Aug 22, 2020

Work on features for 1.0 is finished. Documentation is updated.
Please check the master branch for accessibility issues.

@alekssamos
Copy link

Hello. On the Events tab, or Widget tab - list ctrl add columns, when the focus hits "GridWindow" clicking the arrows doesn't say anything and the "Tab" and "Shift+Tab" buttons can't get me out of this table.
widget
events

@DietmarSchwertberger
Copy link
Collaborator

Hi!

You need to stay in the text controls above the grid. That's why they are there when you have enabled "Show editors fro Grid Properties".
When you are in these controls, you can move from line to line with the up/down arrow keys.

@alekssamos
Copy link

"grid" is absorbed by the rest of the keyboard presses, except for the arrows, when the arrows are pressed, NVDA is silent, you can only find out which element is selected, you can only copy ctrl+c and listen to the contents of the clipboard. You can live with this if you know the keys for focusing on other sections of the window, or by pressing CTRL+TAB, but still I decided to say this, since the usual TAB/SHIFT+TAB NVDA focus gets stuck and does not exit

@davidkreynolds
Copy link

davidkreynolds commented Jan 19, 2021 via email

@DietmarSchwertberger
Copy link
Collaborator

Well, I will do whatever can reasonably be done.
Would it help to stop Tab from moving into the grid? E.g. when the cursor is in the "Handler" text control and the user presses Tab, don't move to the grid but call wx.Bell instead?

Greying out is not so nice as e.g. I'm using the grid as well as the separate editors.

@SeanTolstoyevski
Copy link
Contributor

@DietmarSchwertberger grid view is not compatible with screen readers in any gui tool.
Screen readers may have shortcomings in this regard.

Perhaps hiding it while the screen reader is active would be a good solution.

@DietmarSchwertberger
Copy link
Collaborator

OK, I have modified the REV_1.0 and master branches accordingly.

Please test and provide feedback.

@davidkreynolds
Copy link

davidkreynolds commented Jan 19, 2021 via email

@davidkreynolds
Copy link

davidkreynolds commented Jan 19, 2021 via email

@alekssamos
Copy link

There has to be another way out. If you hide it, then how do you look through the list of events at the elements and the list of headers at "list ctrl" and manage it?

@DietmarSchwertberger grid view is not compatible with screen readers in any gui tool.
Screen readers may have shortcomings in this regard.

Perhaps hiding it while the screen reader is active would be a good solution.

@DietmarSchwertberger
Copy link
Collaborator

@adil-s @alekssamos @davidkreynolds @alekssamos @vortex1024 @SeanTolstoyevski @Menelion @ashleygrobler04
I would like to add screen reader support to wxGrid. For this I would need testers to provide feedback. The first step is to download an exe file and check which variant is better.
Check this thread: #539
This is a medium term effort. It will take time until modifications propagate into wxPython and wxGlade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility enhancement New feature or request pending fix is in repository
Projects
None yet
Development

No branches or pull requests

9 participants