Tkinter: The good, the bad, and the ugly!

Octavian Rasnita orasnita at gmail.com
Thu Jan 20 10:44:22 EST 2011


From: "Adam Skutt" <askutt at gmail.com>
Actually, JAWS uses MSAA dead last, as I understand it, because the
API is truly that awful.  But MSAA is necessary whenever you're not
using a Win32 common control or most of the other stuff developed by
MS.  That means essentially every non-MS toolkit that's been
discussed.


Yes, but WxPython uses wxWIDGETS and wxWIDGETS use the standard Win32 controls under Windows, so they are accessible.
And they use Gtk under Linux and Gtk is accessible under Linux also.

That's why I said that WxPython should be prefered.

> And if MSAA is hated it doesn't mean that the accessibility is so poor as
> you might think.

No, but it does mean precisely what I said: application developers can
do the "right" thing and get the wrong result.


Yes of course they can do that if they use the wrong tool. They can't do the right thing if they believe that Tk or Silverlight or Flash is accessible no matter if they follow the recommendations for accessibility, because the screen readers don't support those interfaces.

> Yes, that's a problem but we divagate.

If you believe that is a problem then you cannot say, "Accessibility
does not require special effort" without contradicting yourself.  If
it did not require effort over and above the norm, then the cultural
problem would not exist.


Nope, the cultural problem exists because the programmers use the wrong interface, not because they just don't make the efforts for making that interface more accessible.
To be more clear and not to include in the discussion many interfaces, we are comparing Tkinter and WxPython. Most users that require accessibility are using Windows and under Windows WxPython use the underlying Win32 GUI which is accessible, while Tk is not accessible at all, no matter what the programmers do in order to make the interface accessible.

> Yes of course, Adobe's products are at most very hard accessible or not
> accessible at all and I already said that Gtk is not accessible under
> Windows, just like Tk.

Which means you're excluding a large swath of applications in your
analysis.


I am not excluding anything. I said that all the Tk-based programs are inaccessible no matter what the programmer does to make it accessible, because the screen readers can't work with that interface.
And I have also said which are the accessible interfaces: wxWIDGETS (which use Win32 GUI under Windows and Gtk under Linux), SWT (which I think it does exactly the same thing as wxWIDGETS), WindowsForms (DotNet) and SWING (if the user installs Java Access Bridge).

Some of the interfaces created with other GUI libs might be accessible but it is not sure. What is sure is that the Tk-based interfaces are not accessible.


>  Well, I haven't used WxPython until now, but only WxPerl, however the WxPerl
> programmers don't need to set the tab focus because by default the tab focus
> is set in the order of the controls on the form and I thought it should be
> the same in WxPython.

It's set in the order you create the controls (with some exceptions),
which may or may not be the correct tab focus order.  Moreover, the
same FAQ I linked tells you that you need to set special styles to
support proper tab order when tabbed widgets and certain other
controls are involved, to say nothing of fall backs for certain other
controls that aren't provided automatically.

Yes, but with or without a proper tab order, WxPython creates accessible apps, while Tkinter doesn't.


> Yes, that's true, but as I said, some GUIS like WxPython offer the
> accessibility, so those controls are visible, and it is less important if
> they are in a right tab order or if some of the controls are not labeled,
> because the screen reader can solve these things.

You've said yourself that it often requires trial and error on the
part of the user, so which is it?


It depends if there is a JAWS script defined. JAWS provides by default scripts for dozens of popular applications for making them more usable. Each user can create his/her own script, because JAWS include that scripting language and a programming interface so the user can create their own script for an application for improving its usability, for labeling some not-named controls, for reading some parts of the screen when some events occur and many other things.
If the user doesn't want or don't know how to create that script for improving the usability, he/she might need to learn how to use the application by trial and error, but what I want to show is that the user is *able* to use that application, even if the interface is not very friendly, but it would be absolutely impossible to use an application created with Tkinter.


> A GUI which offers accessible widgets only if they are coded specially for
> beeing accessible are not accessible at all,

That's the case with every GUI API on the planet: if you write a
custom widget you must provide accessibility support for it.  This is
nothing new.


I am not talking about custom controls. Those things are the worst thing possible from the perspective of accessibility, because usually nobody cares about providing accessibility features.
I am talking about standard controls. The standard controls provided by WxPython are accessible, no matter how usable and friendly they are, while the standard controls offered by Tkinter are absolutely inaccessible.


> Have you created that QT application with its default options? Without doing
> anything special to make it accessible?

Yes, you don't have to do a thing, unless you're custom building Qt
yourself.  On Linux, you have to set QT_ACCESSIBILITY = 1, but Linux
is the exception.

> And most important, have you tested it with JAWS screen reader? (Or
> WindowEyes at least) because these are the most used screen readers.
> NVDA is pretty poor and it can't be used for very complex things (yet).
>
No, and I have zero interest in doing so.  Point was merely to
demonstrate your statement was false.


My point was that Tkinter which uses Tk is bad, and I didn't tried too many QT-based applications.
It would be nice if now QT would be accessible, but this won't mean too much if it would be accessible just for NVDA and not for the most used screen readers.

And I don't see what you demonstrate when you wanted to show Tkinter it is comparing with WxPython...

Octavian




More information about the Python-list mailing list