Accessibility/Mac/ContributorGuide: Difference between revisions

Jump to navigation Jump to search
Line 101: Line 101:
This consists of the API necessary to talk to platform accessibility (<code>accessibilityAttributeValue</code>, etc.) and widget code (<code>representedView</code>, etc.)
This consists of the API necessary to talk to platform accessibility (<code>accessibilityAttributeValue</code>, etc.) and widget code (<code>representedView</code>, etc.)


==== mozAccessibleInner Protocol ====
==== MOXAccessible Protocol ====
This inner protocol's API is a mapping to Apple's attributes and actions. It allows us to have simple getter and setter methods for each attribute and a method for performing each action. All methods are optional, so an implementing object gets to choose which subset of these methods it supports. This gets reflected in what is returned to platform in  <code>accessibilityAttributeNames</code> and friends. An instance can also programatically block a method if it is defined and it will be excluded from the mapping.
This inner protocol's API is a mapping to Apple's attributes and actions. It allows us to have simple getter and setter methods for each attribute and a method for performing each action. All methods are optional, so an implementing object gets to choose which subset of these methods it supports. This gets reflected in what is returned to platform in  <code>accessibilityAttributeNames</code> and friends. An instance can also programatically block a method if it is defined and it will be excluded from the mapping.


=== Classes ===
=== Classes ===


==== mozAccessibleBase ====
==== MOXAccessibleBase ====


The abstract base class for all our platform accessibles. This class:
The abstract base class for all our platform accessibles. This class:
* Implements the platform and widget API defined in the <code>mozAccessible</code> protocol. The platform API it implements should be considered "final" (there is no way in Objective C to enforce this).
* Implements the platform and widget API defined in the <code>MOXAccessible</code> protocol. The platform API it implements should be considered "final" (there is no way in Objective C to enforce this).
* Forwards platform methods to the mapped inner protocol's methods.
* Forwards platform methods to the mapped inner protocol's methods.
* Filters ignored accessibles and ensures they are not exposed to the platform.
* Filters ignored accessibles and ensures they are not exposed to the platform.
* Manages the lifecycle of the accessible as it relates to the platform (ie. notify on destroy)
* Manages the lifecycle of the accessible as it relates to the platform (ie. notify on destroy)


A subclass should be able to implement a handful of inner protocol getters and have a well-behaved platform accessible. An example of that is <code>mozColumnAccessible</code>.
A subclass should be able to implement a handful of inner protocol getters and have a well-behaved platform accessible. An example of that is <code>MOXColumnAccessible</code>.


==== mozAccessible ====
==== MOXAccessible ====


The base class for all accessibles that wrap a Gecko accessible. This class:
The base class for all accessibles that wrap a Gecko accessible. This class:
Line 125: Line 125:
* Provides a base set of attributes and actions that most gecko accessibles support.
* Provides a base set of attributes and actions that most gecko accessibles support.


==== mozAccessible subclasses ====
==== MOXAccessible subclasses ====


Subclasses of mozAccessible are mainly gecko role-based and typically provide additional attributes that the type uses. For example a mathml subclass might provide mathml related attributes via implemented inner protocol methods (eg. <code>mathRootRadicand</code>). An accessible that backs a slider might implement special actions via the inner protocol, like <code>performIncrement</code>.
Subclasses of MOXAccessible are mainly gecko role-based and typically provide additional attributes that the type uses. For example a mathml subclass might provide mathml related attributes via implemented inner protocol methods (eg. <code>mathRootRadicand</code>). An accessible that backs a slider might implement special actions via the inner protocol, like <code>performIncrement</code>.
Confirmed users
198

edits

Navigation menu