Accessibility checks
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
The [W3C](https://www.w3.org/TR/mobile-accessibility-mapping/) defines mobile accessibility guidelines. Google provides an [Accessibility test framework for Android](https://github.com/google/Accessibility-Test-Framework-for-Android) that integrates with Espresso.
When Espresso loads a view, the following 16 accessibility checks are run. It'd be great to have similar support in EarlGrey.
**[View checks](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/dafd7ed63daff45dba53c49c893ea9f84af4a942/src/main/java/com/google/android/apps/common/testing/accessibility/framework/AccessibilityCheckPreset.java#L58)**
* [TouchTargetSizeViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/TouchTargetSizeViewCheck.java) - Check to ensure that a view has a touch target that is at least 48x48dp.
* [TextContrastViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/TextContrastViewCheck.java) - Check to ensure that a TextView has sufficient contrast between text color and background color. [Large text is 3:1, Normal text is 4.5:1](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/d3bd04d9146911ad1210dc01bb2f7d0d6ec5524e/src/main/java/com/googlecode/eyesfree/utils/ContrastUtils.java#L41)
* [DuplicateSpeakableTextViewHierarchyCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/DuplicateSpeakableTextViewHierarchyCheck.java) - Check Views in a hierarchy don't have the same speakable text.
* [SpeakableTextPresentViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/SpeakableTextPresentViewCheck.java) - Check to ensure that a view has a content description for a screen reader.
* [EditableContentDescViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/EditableContentDescViewCheck.java) - Check to ensure that an editable TextView is not labeled by a contentDescription.
* [ClickableSpanViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/ClickableSpanViewCheck.java) - Check to ensure that ClickableSpan is not being used in a TextView. ClickableSpan#onClick can't be called by accessibility services.
* [RedundantContentDescViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/RedundantContentDescViewCheck.java) - Checks to ensure that speakable text does not contain redundant information about the view's type.
* [DuplicateClickableBoundsViewCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/DuplicateClickableBoundsViewCheck.java) - Check that containers marked clickable process click events.
**[AccessibilityNodeInfo checks](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/dafd7ed63daff45dba53c49c893ea9f84af4a942/src/main/java/com/google/android/apps/common/testing/accessibility/framework/AccessibilityCheckPreset.java#L101)**
* [EditableContentDescInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/EditableContentDescInfoCheck.java) - Check to ensure that editable nodes are not also labeled with a contentDescription.
* [SpeakableTextPresentInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/SpeakableTextPresentInfoCheck.java) - Check to ensure that an info has speakable text for a screen reader.
* [ClickableSpanInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/ClickableSpanInfoCheck.java) - Check to ensure that ClickableSpan is not being used in a TextView. ClickableSpan#onClick can't be called by accessibility services.
* [TouchTargetSizeInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/TouchTargetSizeInfoCheck.java) - Check to ensure that a node has a touch target that is at least 48x48dp.
* [RedundantContentDescInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/RedundantContentDescInfoCheck.java) - Checks to ensure that speakable text does not contain redundant information about the node's type.
* [DuplicateClickableBoundsInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/DuplicateClickableBoundsInfoCheck.java) - Check that containers marked clickable process click events.
* [ContrastInfoCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/ContrastInfoCheck.java) - Check to ensure that a TextView has sufficient contrast between text color and background color. [Large text is 3:1, Normal text is 4.5:1](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/d3bd04d9146911ad1210dc01bb2f7d0d6ec5524e/src/main/java/com/googlecode/eyesfree/utils/ContrastUtils.java#L41)
**[AccessibilityEvent checks](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/dafd7ed63daff45dba53c49c893ea9f84af4a942/src/main/java/com/google/android/apps/common/testing/accessibility/framework/AccessibilityCheckPreset.java#L144)**
* [AnnouncementEventCheck](https://github.com/google/Accessibility-Test-Framework-for-Android/blob/master/src/main/java/com/google/android/apps/common/testing/accessibility/framework/AnnouncementEventCheck.java) - Check which flags the use of View#announceForAccessibility and AccessibilityEvent#TYPE_ANNOUNCEMENT because they can be disruptive to the user.
Contributor guide
Assessment
This issue has not been assessed yet.