Mac:Accessibility/UniversalAccess: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(apple seems to have been inspired by me, yay! update to be a intro page to UA instead.)
Line 1: Line 1:
= Quick Reference for Universal Access =
= Introduction to Universal Access =


This is a quick reference for Apple's accessibility APIs. Most of this info is gathered from [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Protocols/NSAccessibility.html Apple's page about the NSAccessibility protocol].
This page previously hosted a quick reference to Apple's accessibility framework. Since then, Apple has updated it to be much more useful. See Apple's [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/index.html definition of the NSAccessibility protocol] for a good quick reference.


In the following sections, we will use a few commonly used acronyms for convenience:
In the following sections, we will use a few commonly used acronyms for convenience:
Line 7: Line 7:
* '''UA''' refers to ''Universal Access'' - Apple's name for all of their accessibility APIs.
* '''UA''' refers to ''Universal Access'' - Apple's name for all of their accessibility APIs.


== About attributes ==
== Everything is an Attribute ==
Developers used to MSAA or ATK will find that UA is very easy to use. Everything is basically done just by querying elements for attributes, and setting them.


Every widget that is made accessible supports a range of attributes.  
In this way, one could think of UA kind of like a hash table. You ask for an attribute, and get an array, a string, a number, or any other value describing the data you asked for.


An AT can query the widget for the attributes it supports, and then get to know more information about each individual attribute.  
The first thing an AT typically does, is to ask the [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-BCIIHIGG query widgets about the attributes they support]. It can then go on to see which of those that are "settable", i.e. changable by the user. For example, the value attribute of a textfield is settable.


An attribute might be a widget's role, its value, or what actions it supports.
=== Roles ===
An AT can know the "role" of a widget just by asking for the value of the [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/c_ref/NSAccessibilityRoleAttribute role attribute]. The role tells the AT a lot about the widget behaves (button? listbox? etc.)


See the [[Mac:Accessibility/UniversalAccess:Attributes|full list of attributes]].
=== Actions ===
An action is a way for the user to interact with the interface, e.g. through a screen reader. For example clicking a button, deleting, or incrementing a value. To know [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-DontLinkElementID_20 which actions] a widget supports, is as easy as asking [http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/index.html asking for an array of them].


== About notifications ==
=== Notifications ===
 
[http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-DontLinkElementID_21 Notifications] are sent out to the ATs when something significant in the UI has changed. For example, a new window was opened, or new rows were added to a table.  
UA sends out a notification to any obsering AT when some events occur. This is [http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_6.html regular notifications], that are used throughout Cocoa.
 
See the [[Mac:Accessibility/UniversalAccess:Notifications|list of all accessibility-specific notifications]].
 
== About actions ==
 
Actions are those that let the user interact with the software, e.g., via a Screen Reader or any other AT device.
 
[[Mac:Accessibility/UniversalAccess:Actions|Full list of actions]]


== WebKit additions ==
== WebKit additions ==
WebKit has implement some custom extensions to UA to make it work better in a web context. We've gathered them here as well.
Because UA is easily extendable with new attributes, roles and notifications, WebKit has implemented some custom extensions to UA to make it work better in a web context. We've gathered them here as well.


[[Mac:Accessibility/UniversalAccess:Webkit|WebKit UA extensions]]
[[Mac:Accessibility/UniversalAccess:Webkit|WebKit UA extensions]]


= Comments, suggestions, etc =
= Comments, suggestions, etc =
Feel free to add and improve this introduction, or even copy it to another wiki.


Feel free to add and improve this reference, or even copy it to another wiki. At the moment, there is no good resource about these APIs except for Apple's pages, which in some cases have been found to be outdated and incorrect.
--[[User:Hwaara|HakanW]] 05:10, 24 May 2006 (PDT)
 
--[[User:Hwaara|HakanW]] 09:36, 8 May 2006 (PDT)

Revision as of 12:10, 24 May 2006

Introduction to Universal Access

This page previously hosted a quick reference to Apple's accessibility framework. Since then, Apple has updated it to be much more useful. See Apple's definition of the NSAccessibility protocol for a good quick reference.

In the following sections, we will use a few commonly used acronyms for convenience:

  • AT, means Assistive Technology, or simply a 3rd party application, e.g., a Screen Reader.
  • UA refers to Universal Access - Apple's name for all of their accessibility APIs.

Everything is an Attribute

Developers used to MSAA or ATK will find that UA is very easy to use. Everything is basically done just by querying elements for attributes, and setting them.

In this way, one could think of UA kind of like a hash table. You ask for an attribute, and get an array, a string, a number, or any other value describing the data you asked for.

The first thing an AT typically does, is to ask the query widgets about the attributes they support. It can then go on to see which of those that are "settable", i.e. changable by the user. For example, the value attribute of a textfield is settable.

Roles

An AT can know the "role" of a widget just by asking for the value of the role attribute. The role tells the AT a lot about the widget behaves (button? listbox? etc.)

Actions

An action is a way for the user to interact with the interface, e.g. through a screen reader. For example clicking a button, deleting, or incrementing a value. To know which actions a widget supports, is as easy as asking asking for an array of them.

Notifications

Notifications are sent out to the ATs when something significant in the UI has changed. For example, a new window was opened, or new rows were added to a table.

WebKit additions

Because UA is easily extendable with new attributes, roles and notifications, WebKit has implemented some custom extensions to UA to make it work better in a web context. We've gathered them here as well.

WebKit UA extensions

Comments, suggestions, etc

Feel free to add and improve this introduction, or even copy it to another wiki.

--HakanW 05:10, 24 May 2006 (PDT)