PowerBuilder provides the infrastructure and properties needed to build accessibility features into your Windows and Web applications. Its features allow applications to conform generally to Microsoft Active Accessibility (MSAA) Version 2. MSAA is a Windows standard that defines the way accessibility aids obtain information about user interface elements and the way programs expose information to the aids.
PowerBuilder standard controls support all required Microsoft Active Accessibility properties as listed in the following table:
Microsoft Active Accessibility property |
PowerBuilder property support |
---|---|
Name |
objectname.AccessibleName Some controls support the Name setting through the Text or Title property. For all controls, Name is customizable through the AccessibleName property. |
Role |
objectname.AccessibleRole Customizable through the AccessibleRole property. |
State |
Default Active Accessibility support |
Location |
Default Active Accessibility support |
Parent |
Default Active Accessibility support |
ChildCount |
Default Active Accessibility support |
Keyboard Shortcut |
Default Active Accessibility support for “&” access key of the Text property Also, PowerBuilder Accelerator property setting if applicable to the control. |
DefaultAction |
Default Active Accessibility support (For example, a selected check box has a default action of uncheck.) |
Value |
Default Active Accessibility support (For example, a selected check box has the value checked.) |
Children |
Default Active Accessibility support (For example, items in a list box.) |
Focus |
Default Active Accessibility support |
Selection |
Default Active Accessibility support |
Description |
objectname.AccessibleDescription Customizable through the AccessibleDescription property. |
Help |
Not supported |
HelpTopic |
Not supported |
For PowerBuilder visual controls that inherit from DragObject, you can manipulate the IAccessible Name, Role, and Description properties of each control by using PowerBuilder dot notation or the Other page in the Properties view of the painters. You can also manipulate the IAccessible property KeyboardShortcut using PowerBuilder properties wherever the ampersand in text property and accelerator property are supported. Other IAccessible properties are set automatically using Active Accessibility default support. (For example, location is automatically updated with absolute screen coordinates for Windows controls at runtime.)
The following table lists PowerBuilder visual controls that inherit from DragObject and their default accessible roles:
PowerBuilder visual controls |
AccessibleRole enumerated value |
---|---|
Animation |
animationrole! |
CheckBox |
checkbuttonrole! |
CommandButton |
pushbuttonrole! |
DataWindow |
clientrole! |
DropDownListBox |
comboboxrole! |
DropDownPictureListBox |
comboboxrole! |
EditMask |
textrole! |
Graph |
diagramrole! |
GroupBox |
groupingrole! |
HProgressBar, VProgressBar |
progressbarrole! |
HScrollBar, VScrollBar |
scrollbarrole! |
HTrackBar, VTrackBar |
sliderrole! |
ListBox |
listrole! |
ListView |
listrole! |
MonthCalendar |
clientrole! |
MultiLineEdit |
textrole! |
Picture |
graphicrole! |
PictureButton |
pushbuttonrole! |
PictureHyperLink |
linkrole! |
PictureListBox |
listrole! |
RadioButton |
radiobuttonrole! |
RichTextEdit |
clientrole! |
SingleLineEdit |
textrole! |
StaticHyperLink |
linkrole! |
StaticText |
statictextrole! |
Tab control |
clientrole! |
Tab page |
clientrole! |
TreeView |
outlinerole! |
The OLEControl control is set to pushbuttonrole! by default. You need to set this role depending on content.
PowerBuilder implements the MSAA standard for the DataWindow custom control and its children.
The AccessibleName and AccessibleDescription properties take string values. The AccessibleRole property takes the value of the AccessibleRole enumerated variable.
There are some limitations regarding accessibility support in the DataWindow:
For the navigation function accNavigate, spatial navigation (navigation by keyboard based on screen location) is not supported. Logical navigation, where keyboard navigation follows a logical tab sequence, is supported only for columns in the detail band. Columns that have a tab value set to 0 so that users cannot update them cannot be accessed from the keyboard.
The Composite, Label, N-Up, OLE 2.0, and RichText DataWindow styles are not supported.
Support for OLE objects, OLE database columns, and nested reports in DataWindows is limited.
PowerBuilder cannot provide accessibility for control content. This must be provided by the control vendor.
The following statements set the IAccessible properties for a command button in a Window:
cb_1.accessiblename = "Delete" cb_1.accessibledescription = "Deletes selected text" cb_1.accessiblerole = pushbuttonrole!
The following statement sets the AccessibleName property of a button in a DataWindow object:
dw_1.Object.b_1.accessiblename = "Update"
The following statements set the AccessibleRole property for a button in a DataWindow object to 43 (the number associated with PushButtonRole!) and return the property to a string variable:
string ls_data dw_1.Object.b_1.AccessibleRole = 43 ls_data = dw_1.Describe("b_1.AccessibleRole")
When you deploy an accessible application, you must deploy the pbacc125.dll file.
For more information, see the Microsoft general accessibility Web site. Also helpful is the WebAim Web site.