accessibility-element-scan v1.0.2
Accessibility Element Scan
Accessibility element Scan is a module which annotates the missing voice over accessibility attributes for any screens of Native apps for both iOS and Android Platform.
Installation
Install Accessibility Scanner as a local dev dependency in your tested project: npm i accessibility-element-scan
Getting started with the Accessibility Scanner
Accessibility Constructor creates an instance of accessibility, which then exposes method to run and configure accessibility
const accessibility = require(‘accessibility-elements-scanner’); const annotatedImage = accessibility.scanAccessibiltyAttributes(screenName);
Usage with gherkin const accessibility = require(‘accessibility-elements-scanner’); Then(/^I scan the "(^"*)" screen for accessibility attributes/, async (screenName) => {
await accessibility.scanAccessibilityAttributes(screenName);
});
// Provides the screenshot of the given screen with annotations done on elements With missing voice over accessibility attribute
Pre-requisite:
- Basic cucumber java script mobile automation framework
- To save the Screenshots there should be a pre-populated folders by name elementScreenshots and IOSelementsScreenshots
- Node version >= 14
Note:
This module is supported on all Android devices and on iOS it is supported on devices of display size >= 5.8 in
Why?
- For web apps, there are many extensions/tools which are readily available in the market to identify the accessibility issues but for Native apps there are none
- so, this package reduces the initial manual voice over testing efforts for couple of iterations, which works on both iOS and Android platform with single line of code
- It scans the DOM of the element and provides annotation on the Screenshots whose accessibility attribute is missing.