Test the accessibility of a mobile app
This article explains how to use the sample Java utility to test the accessibility of a mobile app screen. The examples provided pertain to an Android app, but the procedure is the same for an iOS app.

- Log in to your Perfecto cloud and open the device in the Manual Testing view.
-
Install and launch the application under test and navigate to the screen where you intend to perform the accessibility test.
- In the Java utility, provide the following required details:
- Perfecto Cloud URL: Your cloud URL, for example https://demo.app.perfectomobile.com
User Security Token: Your security token for the Perfecto cloud
To generate a security token
In the Perfecto UI at <YourCloud>.app.perfectomobile.com (where YourCloud is your actual cloud name, such as mobilecloud), click your user name and select My security token.
In the My security token form, click Generate Security Token.
Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto.
- Click Close.
Device Name/UUID: The unique ID of the device on which you want to perform accessibility tests
WithSessionID: Select to prepare for session sharing
Note: Using the Java utility without session sharing (that is with the WithSessionID checkbox cleared) is not recommended.To perform a manual accessibility test without session sharing, you need to provide the app identifier of the application under test, such as io.perfeto.expense.tracker. If you do not know the app identifier, you can find it in the legacy Perfecto UI, as shown in the following image. In the new Perfecto UI, this information will become available soon.
Without session sharing, the Generate Report option is disabled and accessibility reports will be generated on each execution. This means that for each page to test, you need to open the device, navigate to the intended page, and then close the device and run the tests.
Device Session ID: The session ID as copied from the device in the Perfecto cloud. For more information, see Share a session with an IDE script.
- Current Screen Name: A meaningful name for the current screen. This will help you identify the report later on. Make sure you give each screen you test a unique, descriptive name, such as AndroidExpenseTrackerLoginPage.
Device option selected
- Output Folder: The local folder where you want store accessibility reports.
Application type: Select Perfecto to run the accessibility test on a native application
Proxy: Select if you need to connect through a proxy to enable the Proxy Host and Proxy Port fields. Then provide the required information.
If your proxy requires credentials, provide them in the User Name and Password fields.
-
Click Run, and then click OK. The utility now runs the script in the background to generate the report.
The progress bar indicates the current execution.
-
Repeat step 4 for each screen you want to test. Make sure to update the Current Screen Name field each time. For example, if you log into the Expense Tracker app and run tests on the Home page, you can enter AndroidExpenseTrackerHomePage as a screen name, as shown in the following image.
Note: With session sharing, accessibility reports will be generated only after closing the device. You can navigate to the different pages, run accessibility tests with unique screen names, and generate reports when the execution has finished for all pages. - To generate the accessibility report:
- Close the device.
- Click Generate Report to download the accessibility report.
To confirm that the device is closed, click Yes.
The Java utility automatically downloads the accessibility reports with the values provided in the Current Screen Name field into the given output directory. When the report generation is complete, a confirmation message displays.
-
Navigate to the output folder. For each app screen tested, the folder should include a dedicated subfolder.
Each subfolder contains:
- A
.zip
file, which includes the accessibility test based on the app platform:- For an Android app, the report is in JSON format, highlighting the violations found, along with a screenshot for each violation, in PNG format
- For an iOS app, the report is in HTML format
- The
PerfectoReport.txt
file, which includes a link to the Single Test Report in the Perfecto UI, where you can also download the accessiblity report
- A
-
Extract each
.zip
file. -
To download the accessibility report from Perfecto Smart Reporting, navigate to the link included in the
PerfectoReport.txt
file.The following image shows consolidated executions in the Report Library.
Sample reports
The following are sample reports and interpretations for Android and iOS created using the Perfecto option.

Accessibility report of the Expense Tracker Login page
[
{
"id": 1,
"type": "ERROR",
"message": "This item's height is 32dp. Consider making the height of this touch target 48dp or larger.",
"package": "io.perfecto.expense.tracker",
"class": "android.widget.CheckBox",
"text": "Enable Biometric",
"resource name": "io.perfecto.expense.tracker:id\/login_biometric_check_box",
"leftX": 527,
"rightX": 1009,
"topY": 1264,
"bottomY": 1348
},
{
"id": 2,
"type": "WARNING",
"message": "The item's text contrast ratio is 4.07. This ratio is based on an estimated foreground color of #0086BF and an estimated background color of #FFFFFF. Consider using colors that result in a contrast ratio greater than 4.50 for small text, or 3.00 for large text.",
"package": "io.perfecto.expense.tracker",
"class": "android.widget.TextView",
"text": "EXPENSE TRACKER",
"resource name": "io.perfecto.expense.tracker:id\/tv_login_head",
"leftX": 484,
"rightX": 1051,
"topY": 853,
"bottomY": 923
},
{
"id": 3,
"type": "WARNING",
"message": "The item's text contrast ratio is 2.68. This ratio is based on an estimated foreground color of #9E9E9E and an estimated background color of #FFFFFF. Consider using colors that result in a contrast ratio greater than 4.50 for small text, or 3.00 for large text.",
"package": "io.perfecto.expense.tracker",
"class": "android.widget.EditText",
"text": "Email*",
"resource name": "io.perfecto.expense.tracker:id\/login_email",
"leftX": 100,
"rightX": 1436,
"topY": 942,
"bottomY": 1091
},
{
"id": 4,
"type": "WARNING",
"message": "The item's text contrast ratio is 2.68. This ratio is based on an estimated foreground color of #9E9E9E and an estimated background color of #FFFFFF. Consider using colors that result in a contrast ratio greater than 4.50 for small text, or 3.00 for large text.",
"package": "io.perfecto.expense.tracker",
"class": "android.widget.EditText",
"text": "Password*",
"resource name": "io.perfecto.expense.tracker:id\/login_password",
"leftX": 100,
"rightX": 1436,
"topY": 1110,
"bottomY": 1259
}
]
The JSON report lists 4 accessibility violations on this page, categorized as follows:
Error:
- Violations: 1
- Violation Type:Touch Target Size
- Description: Accessibility Scanner looks for small touch targets that could cause difficulty for users with motor impairments.
Warnings:
- Violations: 3
- Violation Type:Low Contrast
- Description: Accessibility Scanner suggests improvements to color contrast ratios to make your app more accessible to visually impaired users.
For more information, see How to read Accessibility Scanner results.

This is the expense report for an iOS Perfecto app.
For more information on reading these results, see Accessibility Inspector | iOS.