Test the accessibility of a web mobile app

This article explains how to use the sample Java utility to test the accessibility of a web mobile app screen.

Sample report

Following is an extract from the sample Axe Accessibility report of the Web Expense Tracker Login page with interpretations for Android and iOS, created using the Axe option. The Violations.txt file created for each execution includes the link to the STR in the Perfecto Report Library along with consolidated validations.

The result interpretation is the same for the Perfecto and Axe options.

Copy
Error 1
Impact: critical; Rule ID: image-alt
; Summary: Fix any of the following:
  Element does not have an alt attribute
  aria-label attribute does not exist or is empty
  aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
  Element has no title attribute or the title attribute is empty
  Element's default semantics were not overridden with role="presentation"  Element's default semantics were not overridden with role="none"; Selector:    .ion-color-primary.ion-color[color="primary"] > img
 HTML:        <img _ngcontent-c1="" height="45" src="assets/images/perfecto-logo.png">Error 2
Impact: moderate; Rule ID: landmark-one-main
; Summary: Fix all of the following:
  Document does not have a main landmark
; Selector:    html
 HTML:        <html lang="en" class="plt-android plt-phablet plt-mobile md" mode="md">

For information on Axe Accessibility rules regarding the reported violations, see this List of axe 4.1 Rules.