View Issue Details

IDProjectCategoryView StatusLast Update
0024135LazarusWidgetsetpublic2018-12-21 12:37
ReporterLubos Pintes Assigned To 
Status acknowledgedResolutionopen 
Fixed in Version1.1 (SVN) 
Summary0024135: TBitBtn is inaccessible on Windows
DescriptionCurrently, TBitBtn which is used in Lazarus everywhere has no name for screen reader. This means, that screen reader reports only "button", instead of "ok button", "yes button", etc.
The fix is simple:
class procedure TWin32WSBitBtn.SetText(const AWinControl: TWinControl;
const AText: string);
  TWin32WSWinControl.SetText(AWinControl, AText);
TagsNo tags attached.
Fixed in Revision41655
Attached Files


parent of 0024583 closedPaul Ishenin Lazarus LCL-win32: Button captions with & painted twice 
related to 0026718 resolvedJuha Manninen Patches [Windows] Menu texts incorrectly or not updated ==> accessibility issues 


Paul Ishenin

2013-06-10 10:30

manager   ~0068181

Please test and close if ok. And thanks for the patch.

Paul Ishenin

2013-06-13 09:35

manager   ~0068272

The solution with SetText() does not work with how we draw a glyph currently. It start to duplicate text output. The solution is to change BS_BITMAP button style to BS_OWNERDRAW on WinXP but that requires rather big code change.

Lubos Pintes

2014-02-17 11:12

reporter   ~0073111

Unfortunately, this is not fixed. Tested right now. Behaviour is the same as before.
I am on Windows 7 64-bit. A Windows XP is mentioned in another note. Could this make a difference?

Flávio Etrusco

2014-06-30 17:37

developer   ~0075979

Doesn't implementing WM_GETTEXT work?

Denis Kozlov

2014-09-18 15:40

reporter   ~0077357

I also got hit by this problem, or better put, visually impaired users of my software who are forced to use screen readers got hit by it.

For the reference, tested with two most common screen readers JAWS (paid, trial) and NVDA (free), both can't read TBitBtn.

Denis Kozlov

2014-09-18 15:47

reporter   ~0077358

This problem still exists, tested on Windows 7.

Please remove "fixed" resolution.


2014-09-18 18:07

reporter   ~0077366

I'm currently in the way to implement MSAA (i.e. Microsoft Active Accessibility), at least for the most common controls, concerning the LCL accessibility part for Windows.

I've planned to code first a "workaround", which doesn't need to modify the LCL in any way, and which requires very few additional code (generally 2 conditional instructions). It could be considered as a sort of "draft" for the next step...

And then, to propose some patches to include it directly in the LCL (not necessarily exactly in the same way).

I've not always a lot of spare time and I'm not necessarily the most competent person for doing this job, but until someone else could do it better than me, I guess I could at least do the basic job.

There has been a discussion in the forum about this subject (i.e. Windows accessibility for the LCL). And you can for instance download a first beta version of my workaround with a basic sample program (the sample includes a BitButton) plus a brief documentation in the forum itself. More precisely, in this post:,25635.msg157228.html#msg157228

Feel free to comment/suggest/report bugs in the forum itself (in this topic of the forum for instance).

Hope it helps...

Denis Kozlov

2018-12-21 12:35

reporter   ~0112774

Last edited: 2018-12-21 12:37

View 2 revisions

A suggestion...

Rather than fixing TBitBtn to make it accessible, why not add support for an icon to the standard TButton instead, using native widget methods?

For example, on Windows, one can use BM_SETIMAGE message to add an icon to a button, like so:

SendMessageW(Button1.Handle, BM_SETIMAGE, IMAGE_ICON, Image1.Picture.Icon.Handle);

Would it be possible to implement something similar on other platforms/widgets?

Issue History

Date Modified Username Field Change
2013-03-25 16:22 Lubos Pintes New Issue
2013-06-10 10:30 Paul Ishenin Fixed in Revision => 41655
2013-06-10 10:30 Paul Ishenin LazTarget => 1.2
2013-06-10 10:30 Paul Ishenin Note Added: 0068181
2013-06-10 10:30 Paul Ishenin Status new => resolved
2013-06-10 10:30 Paul Ishenin Fixed in Version => 1.1 (SVN)
2013-06-10 10:30 Paul Ishenin Resolution open => fixed
2013-06-10 10:30 Paul Ishenin Assigned To => Paul Ishenin
2013-06-10 10:30 Paul Ishenin Target Version => 1.2.0
2013-06-13 09:33 Paul Ishenin Relationship added parent of 0024583
2013-06-13 09:35 Paul Ishenin Note Added: 0068272
2013-06-13 09:35 Paul Ishenin Status resolved => acknowledged
2013-06-13 09:35 Paul Ishenin Assigned To Paul Ishenin =>
2014-02-16 16:34 Martin Friebe LazTarget 1.2 => 1.4
2014-02-16 16:34 Martin Friebe Target Version 1.2.0 => 1.4
2014-02-17 11:12 Lubos Pintes Note Added: 0073111
2014-06-30 17:37 Flávio Etrusco Note Added: 0075979
2014-09-09 23:25 Juha Manninen LazTarget 1.4 => -
2014-09-09 23:25 Juha Manninen Target Version 1.4 =>
2014-09-18 15:40 Denis Kozlov Note Added: 0077357
2014-09-18 15:47 Denis Kozlov Note Added: 0077358
2014-09-18 16:26 Juha Manninen Resolution fixed => open
2014-09-18 18:07 ChrisF Note Added: 0077366
2014-10-04 19:13 Juha Manninen Relationship added related to 0026718
2018-12-21 12:35 Denis Kozlov Note Added: 0112774
2018-12-21 12:37 Denis Kozlov Note Edited: 0112774 View Revisions