Page 1 of 1

TStatusBarPro and Screenreaders / GUI Test Automation Tools

PostPosted: April 16th, 2013, 7:55 am
by jmarder
Hi.

I noticed that screen-readers and GUI automation/test tools are no longer able to access the text of the status bar panels, compare to Delphi's TStatusBar. The reason is simple: Since they are all declared as owner drawn Windows seems to ignore the text passed with the SB_SETTEXT message.

A quick but only partly solution is to not use owner drawing if not necessary:

if not ParentFont or (ImageIndex > 0) then Flags := Flags or SBT_OWNERDRAW;

A better solution would be to implement the Microsoft Accessibility interface MSAA, but this of course means some extra work. This is what we did in the VirtualTreeView component, which is entirely owner drawn.

A third solution would be to turn off owner drawing once the MSAA interface was requested. The according message WM_GETOBJECT is only received a if screen-reader or GUI test/automation tools are actively querying the MSAA interface.

Regards,

Joachim

Re: TStatusBarPro and Screenreaders / GUI Test Automation To

PostPosted: April 26th, 2013, 7:58 pm
by Kambiz
Thanks for the information.

I would prefer the second option which is implementing of MSAA interface. Sadly it's difficult to find a free time for doing this task done.

Re: TStatusBarPro and Screenreaders / GUI Test Automation To

PostPosted: April 29th, 2013, 7:49 am
by jmarder
Yes, I also would like to have more spare time for VirtualTreeView. MAybe it helps if you have a look on how we did MSAA there:
http://code.google.com/p/virtual-treeview/source/browse/trunk/Source/VTAccessibility.pas

Best regards,

Joachim