No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
caseyburkhardt Accessibility Test Framework v3.0
Major updates:
 - 'uielement' package for generic UI representation
 - 'checks' package and AccessibilityHierarchyCheck for consolidated evaluation logic
 - New check: ClassNameCheck
 - New check: TraversalOrderCheck
 - Localized result strings
 - Protocol buffer representations for UI hierarchy, results, and Android constructs
 - Build switched to gradle
Latest commit a6117fe Mar 21, 2018


Accessibility Test Framework for Android
To help people with disabilities access Android apps, developers of those apps
need to consider how their apps will be presented to accessibility services.
Some good practices can be checked by automated tools, such as if a View has a
contentDescription. Other rules require human judgment, such as whether or not
a contentDescription makes sense to all users.

For more information about Mobile Accessibility, see:

For more information about accessibility testing for Android applications, see:

This library collects various accessibility-related checks on View objects as
well as AccessibilityNodeInfo objects (which the Android framework derives from
Views and sends to AccessibilityServices).

Building the Library
The supplied build.gradle file can be used to build the Accessibility Test
Framework with gradle. The build.gradle file can also be used to import the
project to Android Studio.

Sample Usage
Given a view, the following code runs all accessibility checks on all views in the
hierarchy rooted at that view and throws an exception if any errors are found:

Set<AccessibilityHierarchyCheck> checks =
AccessibilityHierarchy hierarchy = AccessibilityHierarchy.newBuilder(node, context).build();
List<AccessibilityHierarchyCheckResult> results = new ArrayList<>();
for (AccessibilityHierarchyCheck check : checks) {
List<AccessibilityHierarchyCheckResult> errors =
        results, AccessibilityCheckResultType.ERROR);
if (errors.size() > 0) {
  throw new RuntimeException(errors.get(0).getMessage().toString());