Screen readers
How to integrate with platform screen readers?
Understanding screen readers
Screen readers are special system applications that transform the application's graphical user interface into speech. The behavior may change between screen reader implementations, but, basically, each widget is named and described by speech.
Providing form item descriptions to screen readers
Screen readers use special bindings to get the information that they need (name, full description, hierarchy, triggered actions, and so on) about each graphical component of the entire graphical user interface. It is up to the programmer to provide these bindings to the screen reader, but most of the work is already done by the front-end.
To allow assistive technologies such as screen readers, The GBC front end implements "Accessible Rich Internet Applications" attributes and roles. For more details about this HTML standard feature, see WAI-ARIA.
Form elements can define accessibility labels and description through TITLE, TEXT and COMMENT attributes, to provide
speech information to screen readers, keeping in mind that the text will be spoken.
All kind of form field, static labels, static images, and action-based items (such as buttons)
are concerned; some containers (GROUP and FOLDER) are read if
their TEXT attributes is defined.
For accessibility
compliance, when a form field is defined with the NOT NULL attribute, the GBC
front-end automatically sets the HTML attribute WAI-ARIA aria-required to
true. Conversely, the aria-required attribute is not set when
using the REQUIRED form field
attribute, as its functional purpose differs from standard ARIA requirement states.
Examples
In field definitions on a form specification file (myform.per)
ATTRIBUTES
EDIT login_name = formonly.login_name, NOT NULL,
TITLE="Login name",
COMMENT="Login name of the current user";
EDIT password = formonly.password, NOT NULL, INVISIBLE, VERIFY,
TITLE="Password",
COMMENT="Password of the current user";
BUTTON b_connect: connect, TEXT="Connect";
EDIT first_name = formonly.first_name, NOT NULL,
TITLE="First name",
COMMENT="First name of the current user";
EDIT last_name = formonly.last_name, NOT NULL,
TITLE="Last name",
COMMENT="Last name of the current user";
DATEEDIT birthdate = formonly.birthdate, FORMAT="mm/dd/yyyy",
TITLE="Birthdate",
COMMENT="Date of birth of the current user";
EDIT email = formonly.email,
TITLE="E-mail address",
COMMENT="E-mail of the current user";
CHECKBOX val = formonly.validated,
TEXT="Valid", -- CheckBox label
TITLE="Valid customer"; -- Used for accessibility
END -- ATTRIBUTES
Using text and comment attributes in an action defaults file
(mydefaults.4ad):
<ActionDefaultList>
<ActionDefault name="new" text="New" image="new.svg"
comment="Create a new database"
acceleratorName="Control-N" />
<ActionDefault name="open" text="Open" image="open.svg"
comment="Open an existing database"
acceleratorName="Control-O" />
<ActionDefault name="save" text="Save" image="save.svg"
comment="Save the current database"
acceleratorName="Control-S" />
...