A11y Ally (as in Accessibility Ally) tool is aimed at developers, designers, and testers to analyze and inspect Android applications' accessibility to all users. Providing an AR-style overlay, it runs alongside your app and highlights issues it discovers and provides insight into what assistive technology users experience when using your app. In addition to providing exploratory feedback for a user manually interacting with their app, A11y Ally can generate reports of accessibility issues it finds, making it possible to integrate into automated testing.
Main Screen | Highlighting Example |
---|---|
It currently only supports a small subset of intended functionality. Check the feature list below or in the app to see what features are currently supported. If there's something missing you would like, feel free to file an issue and I'll work on adding it.
contentDescription
logcat
To get started, open the app and press the yellow, exclamation point button, following the prompts to grant the app its required permissions. Once set up, ensure the check mark at the top is green and turned on. Use the toggles to enable different feature sets and click on the buttons to their left to change their settings. Once set up, you can preview the overlay experience by tapping the Preview Accessibility Overlay button at the bottom.
To enable logging to logcat
and a file, you can send intents to the
com.quittle.a11yally.RecordingService
. To do so, you must have the custom permission
com.quittle.a11yally.MANAGE_RECORDING
. This is to prevent malicious apps from making recordings and
attempting to find sensitive data revealed to A11y Ally. The intents currently supported are
com.quittle.a11yally.START_RECORDING
- Starts a recording sessioncom.quittle.a11yally.STOP_RECORDING
- Stops a recording sessionTo toggle via ADB, you can use the following commands
$ adb shell run-as com.quittle.a11yally am startservice \
-n "com.quittle.a11yally/.RecordingService" \
-a "com.quittle.a11yally.START_RECORDING" \
--user 0
$ adb shell run-as com.quittle.a11yally am startservice \
-n "com.quittle.a11yally/.RecordingService" \
-a "com.quittle.a11yally.STOP_RECORDING" \
--user 0
Once recording is stopped, the app will print out the location of the recording file that you can retrieve. To read it, you will need to again run as the app's user. Below shows one way you could read the file. Note that the exact location may vary between devices.
$ adb shell run-as com.quittle.a11yally cat \
/data/user/0/com.quittle.a11yally/files/recordings/recording.json
In order to simplify the permission's configuration necessary for a user to toggle from the
commandline, A11y Ally grants itself permission to perform these actions. You can then run as the
app's user (com.quittle.a11yally
and --user 0
) to start the service.