[Pas2js] 100 % accessible TTextInputWidget labels
Michael Van Canneyt
michael at freepascal.org
Sat Sep 26 19:39:21 CEST 2020
On Sat, 26 Sep 2020, Mgr. Janusz Chmiel wrote:
> I have big and not simple plea to you.
> WEB pages, such as Google search engine input box, WEB sites
> which requires to add user name, uses special kind of input boxes. Which
> differs from inputbox, which Htmlwidgets unit can create. I Am speaking
> about TTextInputWidget
> When user of screen reader press TAB or SHIFT+TAB, screen reader announce
> The label of Inputbox automatically.
> When I Am using Htmlwidgets unit, Screen reader do not announce Editbox
> label automatically when its get focus.
> The issue is, how to find out, how to create Input box with label, which
> screen readers can announce automatically when some input box get A focus by
> pressing TAB, SHIFT+TAB or arrow keys.
> Thank you very very much for yours time to find out if it would be possible
> to extend Htmlwidgets unit so it would be possible to create such input box
> labels by using TTextInputWidget.
Normally, there is nothing to extend.
Just create a TLabelWidget for each input control,
and set the "LabelFor" property to the input control.
The "Text" property of the label widget should then be read when the input control gets focus.
Michael.
More information about the Pas2js
mailing list