2019-03-15 00:46:23 (edited by Orin 2019-03-15 21:43:07)

Hi all,

Not developing anything at the moment, although I've been stuck as far as getting help on this.

Those of you who watch my Youtube streams know that me and a few friends have been playing around with a sim addon called Ideal Flight.

The developer would like nothing more than to make it accessible, and thanks in part to this topic perhaps, a solution has been found.

Thanks!

Thumbs up

2019-03-15 02:09:36 (edited by Ethin 2019-03-15 02:11:49)

This is remarkably simple. No labeling should need to be done for buttons, check boxes, tabs, menu bars, menu items, menus, labels, and so forth. Labeling is required for edit boxes, tree views, combo boxes, spin boxes, dials, sliders, calendars, colormaps, column views, date/date time edits, double spin boxes, etc. To label items that need to be labeled, set its accessible name. Optionally, set its accessible description. The accessible description should be something that can fit within one-three lines, maximum, and no longer; keep in mind that the screen reader (if it understands accessible description indicators) will read this when moving over the control. You should not have to set the accessible role.
In summary, here are the "accessibility-related" things that you can set/get:

  • Accessible name: a screen-reader-friendly name that identifies the control. Will not be visible on the screen. (I usually set this to the label of the control.)

  • Accessible description: a short summary that will identify what the control does, or will identify what the control must contain, etc. Optional. Some screen readers (NVDA mainly) do not recognize this from GUI toolkits like QT, but do recognise it from other ones. Keep this in mind.

  • Accessible role: the role (the "type"/"class") of the control. Determines how the control will be viewed and interacted with by the screen reader and, by extension, by the user. Do not touch unless necessary. Some GUI toolkits (QT in particular) do not allow you to alter this particular attribute. Others (Windows Forms in particular) do allow you to do this. Again, do not touch this; it is very easy to confuse a user into believing that something is an edit box when it is actually a tree view, and can cause strange behavior when the screen reader attempts to send a message to the control that the control will most likely ignore, and can cause user confusion.

Additionally, you can also set what is known as the 'focus policy'. The focus policy determines how the control behaves when it takes keyboard focus. Labels, for example, will pass the focus to the next control in the focus chain by default. (So far as I know, QT is the only GUI toolkit that allows you to change this.) In QT at least, there are five focus policies:

  • Tab focus: the widget accepts focus by tabbing. (This is the default for most controls.)

  • Click focus: the widget accepts focus by clicking. (Default for controls like labels, graphics, etc.)

  • Strong focus: the widget accepts focus by both tabbing and clicking. On macOS this will also indicate that the widget accepts tab focus when in 'Text/List focus mode'.

  • Wheel focus: akin to strong focus with the addition of allowing focus with the mouse wheel.

  • No focus: the widget does not accept focus.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-03-15 16:25:14

Hi Ethin,

Thanks for the explanation. Unfortunately it appears he really doesn't know how to label an edit box with what he has.

He's been linking me to test GUIs with two edit boxes and asking me how NVDA will read them. He's tried putting labels in the status bar when entering the box, put the label inside the text box... pretty much everything but actually labeling the boxes. Checkboxes he's good.

I told him to download NVDA so he can see how it works but he hasn't yet.

Apparently he uses Embarcadero RAD Architect for design, but I'm not sure what that is, whether its a programming language or what.

Thumbs up

2019-03-15 17:56:52

@3, its an IDE. What programming language and GUI toolkit does he use? If you can provide me with that I can aid you (and him) in setting things up correctly.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-03-15 18:17:22

no bro, you can't just set the text label and have it be magically good with that, in other words, if there is a label to the left, or above the edit boxes, the screen reader will not read it because it is in no way associated with the edit box. Sighted users will make the association, because its right beside or above it, what have you, but a screen reader doesn't see the association. So rather than mess with the text label, you need to set the attributes Ethin discusses in the actual edit box or spin box, not the label associated with the edit box or the spin box.

WThis signature was updated from my iPhone.

Thumbs up

2019-03-15 19:52:42

It shouldn't matter which GUI toolkid he's using/ He's using Winforms, WPF or Win32 GUI from what the OP says.

Raduvay se, raduvay
Raduvay se domaki ne
Kolko liste po gorach
Tolko zdrave na taz kyshcha

2019-03-15 21:02:29

@6, it does. Each GUI toolkit has different ways of setting these attributes (I have no doubt that there are those that do not have support for this at all).

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-03-15 21:38:17

Well, finally he figured out how to do it because in his latest test app the edit boxes read as they should Yay.
I told him to implement that solution into Ideal Flight.

Thanks all. Perhaps he read Ethin's first post and was able to get something from it.
Now I just wish the FSTramp developer, the addon we now use as an autopilot, would feel the same way and change his interface to make it more accessible, but I'll get what I can take.

Thumbs up

2019-03-15 22:16:29

I'm glad I was able to help. Hope more devs learn how to do this, most popular GUI toolkits expose this functionality and its not obscure.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-03-15 22:35:24

@ething I meant that every GUI toolkit build on Win32 should have this function somewhere.

Raduvay se, raduvay
Raduvay se domaki ne
Kolko liste po gorach
Tolko zdrave na taz kyshcha

2019-03-15 23:03:21

@10, not everything has it, as I said. I know that, for example, PureBASIC's GUI/window functionality does not possess this functionality at all.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up