[Pas2js] some accessibility related findings

Michael Van Canneyt michael at freepascal.org
Sun Aug 23 14:27:36 CEST 2020

On Sun, 23 Aug 2020, Mgr. Janusz Chmiel wrote:

> I have analysed various demo apps and I have found out, that if An app uses
> new Webvidgets.pas unit or if An app uses special approach based on .lfm
> files which are The part of The project, todays used algorithms of Windows
> screen readers can not work with such special compiled WEB based app.

webwidgets does not use lfm.

In fact it is a very thin and small layer on top of the web.pas unit.

So I wonder how you came to the conclusion that it is webwidgets that causes this ?

> So by other words, The accessible approach is app, which uses web.pas unit.
> Even yours graphical game with sound is perfectly accessible, because you
> are using Web unit.

As said: webwidgets is only a small layer on top of web.pas.

> So my future is more than clear. I can not work with visual form designers,
> since it uses canvas. Resulting project would not be usable for screen
> readers users.

As far as I know, there is only 1 project that uses the canvas (the canvas
demo project), none of the other projects uses the canvas.

TMS Web core's FNC products use the canvas heavily, but I take care not to
use the canvas...

> Even browserconsole unit produces inaccessible output.

I am very surprised to hear this. It produces simple HTML: 
only DIV tags. No more, no less.

Maybe some aria- attributes must be set for you to be able to access it ?
If you can tell me which ones must be added, I will be glad to add them.

I have no experience with accessibility features, so any assistance you can
offer is welcome.

> It is veŇ°ry probably caused by The some issues related to getting info from
> Webbrowser object.

> So really. EWeb unit is my future. So I must copy all its data types and
> object names for Me to A separate text file buttons, checkboxes, etc. SO I
> will declare those data types correctly.

Please explain this ?

> I have only one big plea.
> How to configure latest stable Lazarus, so it will allow Me to build
> projects based on Pas2js compiler so resulting file will be .html file and
> .js file, and I will do not have to add manually The references to The .js
> script to The .html file?

You need to install the pas2jsdsgn package. You will then get a wizard in
the 'Project - New' dialog that creates a HTML file and pascal file.

It is described in the following wiki page:


Hopefully this helps you.


More information about the Pas2js mailing list