[Lazarus] Accessibility of Lazarus

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Jun 28 08:46:41 CEST 2014


Grzegorz Zlotowicz schrieb:

> the fragment of the NVDA's log says about this control:
> 
> name: u''
> role: ROLE_BUTTON
> states: STATE_FOCUSABLE, STATE_FOCUSED
> isFocusable: True
> hasFocus: True
> description: None
> value: None
> windowHandle: 32703706
> windowClassName: u'Button'
> windowText: u''
> displayText: u''
> IAccessible event parameters: windowHandle=32703706, objectID=-4, childID=0
> IAccessible accName: None
> IAccessible accRole: ROLE_SYSTEM_PUSHBUTTON
> IAccessible accState: STATE_SYSTEM_DEFAULT, STATE_SYSTEM_FOCUSED, 
> STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048836)
> IAccessible accDescription: None
> IAccessible accValue: None

It looks to me like the WNDCLASS and/or WNDPROC of the control lacks 
support for the Name, WindowText and DisplayText fields or methods. E.g. 
for the WindowText the WNDPROC should react on WM_GETTEXT messages. The 
NVDA developers should know more about how they try to obtain above 
properties from a window handle.

The fix depends on the handling of the WNDCLASS.WNDPROC in the Lazarus 
widgetsets, at both designtime and runtime. In either case this WNDPROC 
should react properly on WM_GETTEXT, i.e. return the Text or Caption 
string (PCHAR) associated with the control. The LCL gurus should be able 
to find out why this doesn't work as expected.

A test program can enumerate the window handles, associated with a 
running Lazarus IDE or some Lazarus application, and output the result 
of WM_GETTEXT for each handle. More tests can be added for the other 
properties retrieved by NVDA (selected state...).


It would be helpful if you supply the Lazarus version and widgetset 
which you are using, and whether you use a 32 or 64 bit Lazarus and 
Windows. A screen reader finally should be able to retrieve all required 
values in all these combinations.

Did you also try other than the Win32 widgetset in building the IDE or 
applications, with possibly different results in your screen reader?

DoDi





More information about the Lazarus mailing list