Sign in Join
FPDoc Onlineexperiment

TLazAccessibleObject class

In unit Controls

Represents an accessibility object for user or accessibility tool interactions.

Declaration

pascal
TLazAccessibleObject = class

Description

Every TControl has a TLazAccessibleObject instance associated with it, which means that every TControl is potentially accessible. But to actually be usable, the accessible object needs to have its properties set, the most important of which are the role, description and value. Native windowed classes should already receive accessibility properties from the underlying widgetset, while TCustomControl descendants will use the accessibility properties provided by LCL itself.

User applications should add accessibility for their own TCustomControl descendant classes, and possibly customize the descriptions of some elements. It is also possible to make an accessible object invisible to the user, which is done by setting its AccessibleRole property to larIgnored.

Accessibility support in Lazarus is also documented on the Wiki at: https://wiki.lazarus.freepascal.org/LCL_Accessibility.

See also

Properties

AccessibleNamepublicThe name for this accessible object.
AccessibleDescriptionpublicThe description of this accessible object.
AccessibleValuepublicThe value of this accessible object.
AccessibleRolepublicThe role of this accessible object.
PositionpublicThe position of this accessible object.
SizepublicThe size of this accessible object.
HandlepublicThe widgetset handle of this accessible object.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
GetAccessibleValueprotectedGets the value for the AccessibleValue property.
GetHandleprotectedGets the value for the Handle property.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
HandleAllocatedpublicReturns if the handle of this object was already allocated or not.
InitializeHandlepublicUtilized to set all properties of this property via widgetset routines when creating the handle.
SetAccessibleNamepublicSets the value for AccessibleName.
SetAccessibleDescriptionpublicSetter for the property AccessibleDescription.
SetAccessibleValuepublicSetter for the property AccessibleValue.
SetAccessibleRolepublicSetter for the property AccessibleRole.
FindOwnerWinControlpublicInspect the tree of accessible objects upwards until it finds a parent which is attached directly to a windowed control, a TWinControl.
AddChildAccessibleObjectpublicCreates and returns a new child accessibility object.
InsertChildAccessibleObjectpublicInserts an already created child accessible object as a child of this one.
ClearChildAccessibleObjectspublicRemoves all children of this control; freed if they are not attached to a TControl instance.
RemoveChildAccessibleObjectpublicRemoves a child accessible object.
GetChildAccessibleObjectWithDataObjectpublicObtains a child accessible object by its DataObject property.
GetChildAccessibleObjectsCountpublicReturns the number of direct children that this accessible object has.
GetChildAccessibleObjectpublicObtains a child accessible object by its index.
GetFirstChildAccessibleObjectpublicSearches in sub-controls for the first child accessibility object.
GetNextChildAccessibleObjectpublicSearches in sub-controls for the next child accessibility object.
GetSelectedChildAccessibleObjectpublicReturns the currently selected child accessible object or Nil if none are selected; Override this method in your sub class.
GetChildAccessibleObjectAtPospublicReturns the child of this control located at a particular position given as a client position for the control.
GetEnumeratorpublicDefault enumerator for the children.

Fields

FHandleprotectedMember with the Handle for the accessibility object.
FChildrenSortedForDataObjectprotectedMember with the AVL tree for the sorted child objects.
FAccessibleNameprotectedMember with the value for AccessibleName.
FAccessibleDescriptionprotectedMember with the value for AccessibleDescription.
FAccessibleValueprotectedMember with the value for AccessibleValue.
FAccessibleRoleprotectedMember with the value for AccessibleRole.
OwnerControlpublicThe control that this accessible object is attached to. It might be the main accessible object of this control or it might represent a sub-part of a control.
ParentpublicThe parent TLazAccessibleObject of this accessible object.
DataObjectpublicAvailable to be used to connect to an object.
SecondaryHandlepublicAvailable for Widgetsets to use.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.