Accessibility in Web Dynpro ABAP Applications
Use
To make business applications accessible for users with disabilities who rely on various technical support, the Web Dynpro framework enables you to design accessible applications.
Tooltip
An important prerequisite for accessibility is the availability of a tooltip for each UI element. Each UI element provides a tooltip.
A tooltip must be defined for a UI element to support accessibility in the following cases:
-
The UI element does not have a header
-
No label is assigned to the UI element
-
Elements with a text property have neither set nor bound it (with the exception of the Caption, for which no tooltip is checked). For example, a Button or Link has no text.
For some more complex UI elements a tooltip must always be defined, examples are UI elements Tree or ProgressIndicator.
When you activate your component, you are notified that the content of the tooltip property is missing, provided that this would have been necessary for accessibility of your application. You do however have the option to define a value for your tooltip property dynamically. This option is not included in the syntax check.
AccessibilityDescription
Almost all UI elements additionally provide the property accessibilityDescription. This can be used to include a title, as an alternative, whenever the UI element should not or cannot carry a visible title (Header). In contrast to the case with the tooltip, which should contain a semantic description of the purpose of the UI element, only a short, title-like expression is entered in the accessibilityDescription.
Integration
When developing Web Dynpro ABAP applications, you can specify that you want to follow the accessibility rules. The procedures in pure WDA applications and in WDA applications integrated in the portal are different.
-
Pure WDA Applications
You can activate accessibility mode in the following ways:
-
You enter the accessibility mode in the URL with parameter ?sap-accessibility=X (see Application Parameters and URL Parameters):
The accessibility mode is also specified in the System Logon.
-
You enter the accessibility mode in your user parameters in the system.
In transaction SU01 select for your user name parameter ACCESSIBILITY_MODE with the value X.
-
You enter the accessibility mode in the application parameters for your Web Dynpro application (see Application Parameters and URL Parameters). To do this, on the tab page Parameters in your Web Dynpro application choose WDACCESSIBILITY with the value X.
-
You call the accessibility mode in the Web Dynpro runtime:
Method GET_IS_ACCESSIBLE in IF_WD_APPLICATION is provided for this.
You can find more information about IF_WD_APPLICATION and the relevant methods in the system documentation.
This option sets an internal flag in the runtime, which can be used by applications to output additional information in the HTML output stream, so that screen reader programs can present the visual information on the screen more clearly.
You can query this flag to check whether accessibility is a requirement. If the accessibility provided by Web Dynpro ABAP is not sufficient (for example, for displaying graphics), you can offer special help.
-
-
WDA applications integrated in the portal
If your WDA application is integrated in the portal (see also Portal Integration), you can specify and call the accessibility mode in the portal too.
To do this, in your user profile in the portal, under General Information choose option Activate Accessibility (Screen-Reader erforderlich), and save your entries. This specification is evaluated by Web Dynpro ABAP.
Checks During Design Time
During design time, accessibility checks are carried out automatically as part of the syntax checks.
By double-clicking on any component you can reach the properties and the indicator Accessibility Checks Active. If you deactivate this option, the development environment does not carry out any design time accessibility checks for the relevant component and its views. However, this is not possible if the component in transaction SACC is flagged as accessible.
In principle, no semantic checks can be carried out as the system cannot determine whether or not, for example, the content of a tooltip is useful within a given context. Instead, the system checks whether a specific property is set and filled. If this is not the case, the system checks whether any related properties are set.
The following is a list of the checks that are carried out for the specified UI elements.
UI Element Checks
|
UI Element |
Type of Check |
|---|---|
|
If the text property was not set, the system checks for the tooltip property. An error message is displayed if, for example, a button or link with an icon has neither the text nor the tooltip property. |
|
|
If the properties text and label were not set, the system checks for the tooltip property. An error message is displayed if, for example, a CheckBox has neither the text, label, nor tooltip property. |
|
|
If the caption property has not been set, the system checks for the accessibilityDescription property. An error message is displayed if, for example, a group has neither the caption nor the accessibilityDescription property. |
|
|
If the label and isDecorative properties have not been set, the system checks for the tooltip property. An error message is displayed if a tab-enabled image has an empty tooltip. |
|
|
The system checks whether the label property has been specified. If no label has been set, and no descriptive text has been specified for the appropriate bound context element in the ABAP Dictionary, the tooltip property is checked. An error message is displayed if, for example, a TextEdit does not have a corresponding label or if a DropDownByKey does not have an assigned label and no description was entered in the ABAP Dictionary. |
|
|
If the caption property has not been set, the system checks for the accessibilityDescription property. Furthermore, the system checks whether the aggregation header is set for columns or whether the aggregation header is visible. The tooltip property is not checked. An error message is displayed if a table has neither a caption nor an accessibilityDescription or if a column does not have a (visible) header. |
|
|
If the tooltip property has not been set, the system checks for the accessibilityDescription property. An error message is displayed if, for example, a CheckBoxGroup has neither the tooltip nor the accessibilityDescription property. |
|
|
If the layoutContainer property was not set, the system checks for the accessibilityDescription property. An error message is displayed if a TransparentContainer has the property layoutContainer=false and does not have an accessibilityDescription. |
|
|
The system checks whether the property legendId of the Legend element (Calendar, DateNavigator, Table) was set. |
|
|
The system checks whether the tooltip property has been specified. |
|
|
If the imageSource property has not been set, the system checks for the text property. |
|
|
If the description property was not set, the system checks for the tooltip property. |
|
|
The system checks whether the caption.text property has been set. If not, the system checks whether caption.tooltip is set. |
Automatic Forwarding of Accessibility Flag
You can start another Web Dynpro application from a Web Dynpro ABAP application. This is done using an exit or suspend plug. To run the new application also in the accessibility mode, you do not have to transfer the accessibility flag itself in the URL for the application. Instead, if the URL is intended for another Web Dynpro ABAP application, the field can be transferred automatically (notation of the application is in curly brackets: {App}). The optional parameter IN_FORWARD_ACCESSIBILITY_FLAG in method CONSTRUCT_WD_URL of class CL_WD_UTILITIES is provided for this.
You can also append the field when the URL is generated.