2020-06-27 05:10:04

WxPython is the special child of the mix. It makes my brain hurt, it's overly verbose and somewhat redundant at times. Another issue is that I have to give exact positioning arguments for elements, which, understandably, I can't do effectively.
Are there any simpler modules that allow quick and easy ways to create accessible GUI elements? I don't need anything to complex here, just that I don't want to keep using the same stupid menu system that we've used sense the old days of Bgt.
Cheers:
Redfox.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2020-06-27 05:30:55

You're not going to do much better unless you go to one of the first party solutions or React Native.  It also doesn't matter unless you have enough vision to do layout.  WX has sizers, which you can use for this kind of thin, but I can count the number of accessible GUI libraries in all the languages I know put together on one hand.  And if you do do better, it's not actually by a lot, and it's not actually in a way where you can do it without vision.

I do agree WX is verbose, we should probably eventually write something nicer on top.  NVDA did but it's GPL and tightly coupled with NVDA.  Sighted people don't want better.  Our version of better is their version of we can't match the frontend team's mocks.

My Blog
Twitter: @ajhicks1992

2020-06-27 06:06:58

What about Pyqt5? It looks simpler, and some of the examples I ran were accessible.

2020-06-27 06:22:51

@3
It is this side of possible that QT has suddenly decided to get their accessibility act together so that even marginally advanced controls like buttons don't break. It is also this side of possible that, for those of us who care, the Python bindings aren't LGPL or GPL.  But if it sounds like I'm being somewhat sarcastic, it's because I am--they have been promising they'd get better for years, and I have it on good authority that the reason kindle works is because Amazon forked QT to make it happen and that QT has been ignoring accessibility patches in general.

Put another way maybe, but I doubt it.  QT5 did at least improve on QT4, but given how broken QT4 was and assuming that there hasn't been a lot more work I don't know about, it's still way below WX and/or any other library using native controls (QT draws itself, and is implementing UIA).

My Blog
Twitter: @ajhicks1992

2020-06-27 07:57:02

@WxWrapper. I thought about something like that, a sort of wrapper moduel designed to automate the long winded parts and maybe help out a bit with the placement of GUI elements. I would just have to buckle down and swallow Wx by the handful.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2020-06-27 08:34:00

I mean seriously, the problem is, I don't know what better is here.  We can do better in the explicit case of us, and WX is a little bit C++ish, but even the often-praised Winforms (well, often-praised among blind people) isn't that much less verbose.  Anything modern for Windows or Mac actually goes so far as putting half the UI in a separate file, anything web makes WX verbosity look like nothing (seriously: sighted frontend devs will spend up to 100 lines making a button look right, it's not rare but it happens), anything that tries to abstract and be like "Hi, I am a form with 3 text fields" falls down as soon as you want to do anything even remotely custom and you end up not using it or reinventing all of React-but-not-Javascript.

When I talk to more knowledgeable people than myself on this issue, the general consensus is that how to express UI is still one of those big unsolved problems in programming.  Quite apart from accessibility, the grass isn't actually greener anywhere, and even if you go as far as something like react with respect to terseness where you literally say fuck it I'll rebuild the entire UI from the ground up on every change and not even bother to write code that tries to do myButton.text=bla, even that has its own problems with expressiveness where you find yourself having given up all the things you were complaining about with the more verbose options (true story: I realized this on line 200 or so out of something like 400 or 500 of the accessible treeview I could have done without React in 100 or less).

My Blog
Twitter: @ajhicks1992

2020-06-28 19:06:48

And tkinter also draws itself and doesn't even try to expose UIA, and QT has some weird behaviors on anything more than the simplest of controls. But GUI libraries are just verbose, it's why people started writing GUIs in separate files. Like if you use Java, JavaFX is accessible, but it's kinda like wx, except the fuckers that teach it do some shit like import every single component you need at the top and there's no comma imports, you can do import something.*, which most people probably do. Comp Sci at my college actually wants you to go

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.events.ActionEvent;
import javafx.events.EventHandler;
...

Also don't quote me on those imports, I may have a few packages names wrong. all the goddamn packages makes this even harder to deal with.

----------
An anomaly in the matrix. An error in existence. A being who cannot get inside the goddamn box! A.K.A. Me.

2020-06-29 09:25:45

My experiences so far:
I spend hours and hours with a sighted friend of mine getting wxPython to work, placing things, struggling with sizers and grids, fixing accessibility issues, but getting a pretty accessible interface in the end which looks nice to both sighted and VI people.
I then decided to go for PyQt5, apart from whatever accessibility issues they might have, how non-cooperative the devs are, their accessibility improved that much that the main gui elements are accessible and the layout controls do the automatic positioning for you. I then threw a little helper application for my sighted girlfriend together in like an hour without any x, y, coordinates, location integers whatsoever, it doesn't just look nice (all the controls are distinguishable, don't overlap and are aligned properly) and my girlfriend is using it since then. Its also fully accessible to us, so I don't have anything to complain here.
Although all the points Camlorn has are valid, it all depends on your use case. Why bother with licenses if you just want to use it for some private project? If you want to find them, any project out there has its flaws which could prevent you from using it in your own project, no matter the size or complexity. For me, PyQt5 is my goto GUI library right now, until I hit a brick wall with inaccessible GUI elements, crashes or any other issues show up.
Best Regards.
Hijacker

2020-06-29 10:00:29

@8
Would you mind sharing that helper tool with us?

2020-06-29 13:57:16

Na, its not an application to help with PyQt5, its an application she wanted to use which doesn't have anything to do with development at all. All the functionalities required to develope "positionless" Qt5 tools are built into PyQt5, you just create the controls, add them to whatever layout controls you like and they will be positioned and aligned automatically.
Best Regards.
Hijacker