Difference between revisions of "LCL Accessibility"

From Lazarus wiki
Jump to navigationJump to search
Line 3: Line 3:
 
__TOC__
 
__TOC__
  
==Screen Reader Support==
+
==LCL Accessibility Introduction==
  
===Screen Readers===
+
The LCL should automatically provide accessibility for all of its standard controls, or allow the underlying widgetset to provide its own accessibility for the controls utilized directly from the widgetset. LCL users need to provide accessibility only for TCustomControl descendents introduced in the application. LCL developers need to provide accessibility for all TCustomControl descendents in the LCL and also for all non-windowed controls in the LCL (such as TLabel).
 +
 
 +
The accessibility information provided is a tree of accessible objects which represents the controls hierarchy in the application and which can cover both windowed and non-windowed controls. What the screen reader does exactly with this information is theorically up to him to decide, but of course that it is necessary to test to verify if the most popular screen readers are actually using the information provided in the expected way. The LCL is responsible for making this bridges, since it provides a quite simple accessibility interface and platform APIs, in special the one from Mac OS X, are more complex.
 +
 
 +
TControl will automatically create an accessible object and place it correctly in the accessible objects tree, so it is not necessary to manually create accessible objects unless a control has sub-items which should be represented individually and are not TControl-descendents. One typical example are the items of the TTreeView control. They are not controls, but can be selected individually and therefore each item should be an accessible object on its own.
 +
 
 +
==Screen Readers===
  
 
The first step in testing screen reader support is installing one and being able to use it to check what users will see when using your application.
 
The first step in testing screen reader support is installing one and being able to use it to check what users will see when using your application.
  
====Mac OS X VoiceOver====
+
===Mac OS X VoiceOver===
  
 
The screen reader for the vast majority of users in Mac OS X is VoiceOver which comes pre-installed in Mac OS X. To activate it go to Settings->Universal Access and turn VoiceOver on. It couldnt be any simpler. Using it is also mostly easy and intuitive.
 
The screen reader for the vast majority of users in Mac OS X is VoiceOver which comes pre-installed in Mac OS X. To activate it go to Settings->Universal Access and turn VoiceOver on. It couldnt be any simpler. Using it is also mostly easy and intuitive.
  
====Orca for Linux====
+
===Orca for Linux===
  
 
Orca is currently the most popular screen reader in Linux for both GNOME and KDE. See: http://en.wikipedia.org/wiki/Orca_(assistive_technology)
 
Orca is currently the most popular screen reader in Linux for both GNOME and KDE. See: http://en.wikipedia.org/wiki/Orca_(assistive_technology)

Revision as of 11:39, 20 January 2012

Accessibility means planning and developing applications in a way in which everyone will be able to use them, including blind, persons with low vision, with motion disorders, etc.

LCL Accessibility Introduction

The LCL should automatically provide accessibility for all of its standard controls, or allow the underlying widgetset to provide its own accessibility for the controls utilized directly from the widgetset. LCL users need to provide accessibility only for TCustomControl descendents introduced in the application. LCL developers need to provide accessibility for all TCustomControl descendents in the LCL and also for all non-windowed controls in the LCL (such as TLabel).

The accessibility information provided is a tree of accessible objects which represents the controls hierarchy in the application and which can cover both windowed and non-windowed controls. What the screen reader does exactly with this information is theorically up to him to decide, but of course that it is necessary to test to verify if the most popular screen readers are actually using the information provided in the expected way. The LCL is responsible for making this bridges, since it provides a quite simple accessibility interface and platform APIs, in special the one from Mac OS X, are more complex.

TControl will automatically create an accessible object and place it correctly in the accessible objects tree, so it is not necessary to manually create accessible objects unless a control has sub-items which should be represented individually and are not TControl-descendents. One typical example are the items of the TTreeView control. They are not controls, but can be selected individually and therefore each item should be an accessible object on its own.

Screen Readers=

The first step in testing screen reader support is installing one and being able to use it to check what users will see when using your application.

Mac OS X VoiceOver

The screen reader for the vast majority of users in Mac OS X is VoiceOver which comes pre-installed in Mac OS X. To activate it go to Settings->Universal Access and turn VoiceOver on. It couldnt be any simpler. Using it is also mostly easy and intuitive.

Orca for Linux

Orca is currently the most popular screen reader in Linux for both GNOME and KDE. See: http://en.wikipedia.org/wiki/Orca_(assistive_technology)

Accessibility Inspector Tools

Accessibility inspectors can help a lot at checking if the application is giving correct information.

Mac OS X

In /Developer/Applications/Utilities/Accessibility Tools/ there is an Accessibility Inspector which will be very useful when developing in this platform.

Accessibility APIs

Carbon

Search Google for:

site:developer.apple.com carbon accessibility

Cocoa

Microsoft Active Accessibility

See: http://en.wikipedia.org/wiki/Microsoft_Active_Accessibility

Also: http://www.stevetrefethen.com/blog/UsingtheMSAAIAccessibleinterfacewithinaDelphiApplication.aspx

AT-SPI for Linux

See: http://en.wikipedia.org/wiki/AT-SPI

Qt

See: http://doc.qt.nokia.com/4.3/qaccessiblewidget.html

Also: http://doc.qt.nokia.com/4.3/qaccessible.html#Role-enum

Also: http://doc.qt.nokia.com/qq/qq24-accessibility.html

Concepts mapping

TLazAccessibleObject Qt Mac OS X MSAA AT-SPI Comments
Role QAccessible::Role AXRole Role ? -
Description QAccessibleWidget::setDescription AXRoleDescription and AXDescription ? ? -
Value QAccessibleWidget::setValue AXTitle, AXValue Value, Name, State ? -

See Also