wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.22k stars 509 forks source link

wx.StatusBar not accessible #1507

Open zywek123 opened 4 years ago

zywek123 commented 4 years ago

Operating system: Linux wxPython version & source: 4.07, distro Python version & source: distro

I'm a blind person and I'm trying to write simple notepad for have an experience in gui programming and so on. I want to have some informations on status bar, but The status bar does not emit accessibility events, but on Windows all works fine. So, Orca can't see a status bar on screen in application. It may be problem in c++ code of wx

Metallicow commented 4 years ago

Not sure I can help much, but here is a bare bones sample with a statusbar. It should work on Mac, Windows, and Linux.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

""""""

# Imports.--------------------------------------------------------------------
# -Python Imports.
import os
import sys

# -wxPython Imports.
import wx
import wx.stc as stc

class MySTC(stc.StyledTextCtrl):
    """"""
    def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize,
                 style=0, name='styledtextctrl'):
        """"""
        stc.StyledTextCtrl.__init__(self, parent, id, pos, size, style, name)
        self.SetMarginWidth(1, 0)  # This makes it look like just a simple wx.TextCtrl.

        stcVER = wx.stc.StyledTextCtrl.GetLibraryVersionInfo().GetVersionString()
        wxVER = 'wxPython %s' % wx.version()
        pyVER = 'python %d.%d.%d.%s' % sys.version_info[0:4]

        self.SetText('\n'.join({pyVER, wxVER, stcVER}))

class MyFrame(wx.Frame):
    """"""
    def __init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString,
                 pos=wx.DefaultPosition, size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE, name='frame'):
        """"""
        wx.Frame.__init__(self, parent, id, title, pos, size, style, name)
        global gMainWin
        gMainWin = self
        wxVER = 'wxPython %s' % wx.version()
        pyVER = 'python %d.%d.%d.%s' % sys.version_info[0:4]
        versionInfos = '%s %s' % (wxVER, pyVER)
        self.CreateStatusBar().SetStatusText(versionInfos)
        panel = MySTC(self)
        self.Bind(wx.EVT_CLOSE, self.OnDestroy)

    def OnDestroy(self, event):
        """"""
        self.Destroy()

class MyApp(wx.App):
    """"""
    def OnInit(self):
        """"""
        self.SetClassName('MyApp')
        self.SetAppName('MyApp')
        gMainWin = MyFrame(None)
        gMainWin.SetTitle('MyFrame')
        self.SetTopWindow(gMainWin)
        gMainWin.Center()
        gMainWin.Show()
        return True

if __name__ == '__main__':
    gApp = MyApp(redirect=False,
                 filename=None,
                 useBestVisual=False,
                 clearSigInt=True)
    gApp.MainLoop()

The latest Phoenix documentation can be found here: https://wxpython.org/Phoenix/docs/html/wx.StatusBar.html

Does this help?

zywek123 commented 4 years ago

I know how to create a status bar. I wrote that the status bar is not accessible for blind users on Linux. I don't know the accessibility status on Mac, but on Windows informations shown on status bar are accessible.

Metallicow commented 4 years ago

Sorry, I'm was not sure what you meant by "accessible"? It appears Orca is a screen reader program with a speech synthesizer to understand the information on the statusbar and not a person ...? What version of linux are you using?

If Orca is external software, then it would probably be best if someone familiar with your distro and isn't blind to help you through the initial setup diagnosis. It might be a setting that needs to be changed locally on your distro also. Some linux distributions settings hide menu icons by default for example and the user has to change it in order to sometimes get them to show up. There used to be a few other users on the mailing list that was blind also, but I don't recall what software they used or if it was designed only for a certain operating system or had issues. Maybe someone else will see this and help that is more familiar with screen reader software. I'll plug @RobinD42 for you. He is the lead developer for wxPython. He might have a better answer/idea.

zywek123 commented 4 years ago

I wrote the same information on orca's mailing list, then the developer of orca told me, that is Wx problem. I'm using Archlinux and the newest version of orca and in Libre office, and some gtk and qt applications, orca can read informations on status bar.

RobinD42 commented 4 years ago

Sorry, I'm was not sure what you meant by "accessible"?

@Metallicow, in software "accessibility" means software and/or hardware that facilitate interacting with computers in non-traditional ways, for those who are not able to do so in the traditional ways.

@zywek123, Yes, I expect that it is something that will need to be dealt with in the wxWidgets C++ code.

zywek123 commented 4 years ago

@RobinD42 Will it ever be fixed?

RobinD42 commented 4 years ago

I don't know. You may want to ask on the wx-users group or create a ticket at https://trac.wxwidgets.org/

chigkim commented 3 months ago

I'm running into the same problem on MacOS. It works on Windows with screen reader. However, VoiceOver on MacOS simply does not see the status bar that I created.

chigkim commented 3 months ago

I also created an issue on wxWidgets/wxWidgets.

https://github.com/wxWidgets/wxWidgets/issues/24305

Metallicow commented 3 months ago

I have created a (WIPz) version on the demo, I have spoken to numerous individuals throughout the years, most of what I have given everyone(might not be in main build yet.,) was considered a mixing/addon type of code.

The Usability improvements section of my work on a new framework file stands as is, 'Is usefull' as it most halfly/came from those folks. I am not blind, one-armed, or DEF. I speak American English for what it's worth. Look at it yourself maybe...

https://github.com/Metallicow/wxPython-Sample-Apps-and-Demos/blob/65e6828e92217445367420c9c2ebb4a7ed9a1d6e/Main.py#L3784


... Other than that,... I don't have problems viewing menuitem info on the status at in my program. Tho I will tell you it isn't a simple operation to catch all MenuEvents on the fly... It would have to be program specific .

On Sun, Feb 11, 2024, 7:10 PM chigkim @.***> wrote:

I also created an issue on wxWidgets/wxWidgets.

wxWidgets/wxWidgets#24305 https://github.com/wxWidgets/wxWidgets/issues/24305

— Reply to this email directly, view it on GitHub https://github.com/wxWidgets/Phoenix/issues/1507#issuecomment-1937952103, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDTXRABJTO6HRUBPEQTOHTYTFTYPAVCNFSM4KRC3ISKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTG44TKMRRGAZQ . You are receiving this because you were mentioned.Message ID: @.***>

Metallicow commented 3 months ago

If you specify what type of text you want to display on the statusbar, we may be able to help... Tho you can "pipe" text from almost anywhere...

For example are you hovering a mouse over a button, or scrolling thru a popup-menu? Could be a list Ctrl or some other live program in the background for as all we know...?

Please elaborate further. Is this a wxProgram or compiled elsewhere(ex: any .exe)...?

On Mon, Feb 12, 2024, 12:41 AM Metalio Bovinus @.***> wrote:

I have created a (WIPz) version on the demo, I have spoken to numerous individuals throughout the years, most of what I have given everyone(might not be in main build yet.,) was considered a mixing/addon type of code.

The Usability improvements section of my work on a new framework file stands as is, 'Is usefull' as it most halfly/came from those folks. I am not blind, one-armed, or DEF. I speak American English for what it's worth. Look at it yourself maybe...

https://github.com/Metallicow/wxPython-Sample-Apps-and-Demos/blob/65e6828e92217445367420c9c2ebb4a7ed9a1d6e/Main.py#L3784


... Other than that,... I don't have problems viewing menuitem info on the status at in my program. Tho I will tell you it isn't a simple operation to catch all MenuEvents on the fly... It would have to be program specific .

On Sun, Feb 11, 2024, 7:10 PM chigkim @.***> wrote:

I also created an issue on wxWidgets/wxWidgets.

wxWidgets/wxWidgets#24305 https://github.com/wxWidgets/wxWidgets/issues/24305

— Reply to this email directly, view it on GitHub https://github.com/wxWidgets/Phoenix/issues/1507#issuecomment-1937952103, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDTXRABJTO6HRUBPEQTOHTYTFTYPAVCNFSM4KRC3ISKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTG44TKMRRGAZQ . You are receiving this because you were mentioned.Message ID: @.***>