[program-l] Re: Question about accessibility in wxPython

  • From: Jordy Deweer <jordyydeweer@xxxxxxxxx>
  • To: "program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx>
  • Date: Sat, 5 Oct 2019 17:06:15 +0200

Hey Quentin

If you can provide a small working example (I lack the time to do it quickly 
myself), I would be happy to test it out on a MacBook.

Greetings, Jordy


Sent from Mail for Windows 10

From: QuentinC
Sent: Saturday, October 5, 2019 3:44 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Question about accessibility in wxPython

Hello,

Something that works well on windows (and anyway you don't have anything 
else) is to make sure to create your controls in the right order.

First the static text label, then immediately after, the associated 
control. No other control in between.
Only the order of creation is important. Their place on screen or sizer 
settings have no importance.
You may customize accessibility stuff by using wxAccessible, but it's 
quite complicated if you want to do it well. So better stay out of it. 
Just create your controls in the right order and you have nothing else 
to do.

Always creating controls in a well defined order also implicitely 
establish the tab traversal in that same order.
IN a wxDialog, you then have nothing else special to do to have tab 
working fine. IN wxFrame it works better if all controls are put in a 
wxPanel rather than directly in the wxFrame.

So for example, if you have a login dialog box, you should create the 
controls in that order:
1. wxStaticText "Username:"
2. wxTextCtrl for the username field
3. wxStaticText "Password:"
4. wxTextCtrl for the password
5. wxCheckboxCtrl for remember me
6. wxButton for OK
7. wxButton for Cancel

Note that checkboxes, radios and buttons don't need a static text label, 
because they contin themselves and alone the text read by Jaws/NVDA.

Sadly, I don't knwo at all if  it's so easy in other platforms. No one 
has been able to reply for mac so far, in particular.

Hopes that helps
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: