API Reference

Link to API Reference copied to clipboard

APIs used to customize your scanning configuration.

Not for use with personal data

Make AxeDevTools Work For Your Team

The following APIs will allow you to customize your configuration before scanning. You can find all of the library's public classes and functions in the complete API Reference.

Set a Name for Your Scan

setScanName(param)

Set a name to the scan before uploading it to the dashboard.

Required param:

Name Type Description
name String Name for the scan.

Create Custom Rules

addCustomRule(param)

Add a rule to run against your application during scans.

Required param:

Name Type Description
customRule Class<AxeDevToolsRule> Rule to add

Ignore Rules

ignoreRules(param)

Ignores rules completely from being run against any view.

Required param:

Name Type Description
rulesToIgnore List<String> List of rules to ignore.

ignoreByViewId(param)

Ignores all rules provided for a given viewId.

Required param:

Name Type Description
viewId Int ViewId to ignore.
ruleList List<Class<out AxeRule>> List of rules to ignore.

ignoreAllByViewId(param)

Ignores all rules for the provided viewIds.

Required param:

Name Type Description
viewIds List<Int> List of viewIds to ignore all rules on.

ignoreByView(param)

Ignores all rules provided for a given View.

Required param:

Name Type Description
view View An instance of a view to ignore.
ruleList List<Class<out AxeRule>> List of rules to ignore.

ignoreAllByView(param)

Ignores all rules for the provided View's.

Required param:

Name Type Description
viewIds List<View> List of View to ignore all rules for.

ignoreByClassName(param)

Ignores all rules for a given type that extends View.

Required param:

Name Type Description
view Class<out View> Class to ignore.
ruleList List<Class<out AxeRule>> List of rules to ignore.

ignoreAllByClassName(param)

Ignores all rules for the provided types, which extend View.

Required param:

Name Type Description
classNames List<Class<out View>> List of Classes to ignore all rules on.

ignoreExperimental()

Opts out of experimental rules. Results for experimental rule(s) will have the status of AxeStatus.IGNORED.

resetIgnoredRules()

Clear the ignored Rules list set by the ignored rules APIs. Helpful for changing rule configuration between automated tests.

Tag Scans

tagScanAs(param)

Tags a scan before uploading it to the dashboard.

Required param:

Name Type Description
tags Set<String> List of tags to add to the scan.

ScanResultHandler

saveResultToLocalStorage(param)

Save the accessibility scan result to a local file on your test device.

Required param:

Name Type Description
prefixFilename String Beginning of the filename to save the result as.

getSerializedResult()

Grabs the result of your scan to use within the test.

Delete Scans

deleteResult(param)

Delete a scan's result from the dashboard matching the provided result key.

Required param:

Name Type Description
axeDevToolsResultKey AxeDevToolsResultKey The identifier of the result you'd like to grab.