Skip to main content
Version: v5

About Our Rules

How does automated testing work with AudioEye?

The Accessibility Testing SDK lets you use AudioEye's automated testing suite to analyze your site and get details of the issues discovered.

AudioEye's rules are based on specific criteria we expect are present in your site or code. These are defined by WCAG guidelines (currently built to test for WCAG 2.2 conformance, including levels A-AAA) plus best practices we have developed over years of advising clients how to avoid legal claims caused by accessibility errors.

WCAG guidelines are complex and comprised of multiple criteria, some of which cannot be measured accurately by automated testing. If a rule does not detect any issues, it doesn’t mean the WCAG guideline itself is passed. Rather, the details or expected behavior written in each rule are present.

How rules work in different testing scenarios

Each individual test in the automated test package is called a rule (RuleCode).

Depending on the type of testing you are conducting -- like if you are using the --component flag (we attempt to detect this during Jest testing) or if you are running a full page scan -- the set of accessibility rules that will be run is slightly different.

Component vs full-page rules

Not all rules apply to individual html components, and similarly some issues can only be detected during a full page scan. The following rules will not work when using the --component flag

  • Aria_Landmarks_Missing
  • Heading_H1_Missing
  • Heading_H1_Multiple
  • Html_Attribute_Lang_Invalid
  • Html_Attribute_Lang_Missing
  • Html_DocType_Missing
  • Html_MainContent_IsAriaHidden
  • Html_Page_Title_Missing
  • Html_Page_Title_WeakName
  • Html_SkipLink_Missing
  • Html_SkipLink_Target_Invalid
  • Html_SkipLink_WeakName

Rules requiring browser context

Certain rules require the rendered style of the page to properly determine if there is an accessibility issue or not. The following rules are used in other AudioEye testing products but they will not work when you are using the Jest testing tools.

  • Aria_Label_TextContent_MisMatch
  • Button_Name_Missing
  • Element_Disabled_Detect
  • Element_Focus_Blur_Detect
  • Element_Focus_Visible_Missing
  • Html_PresentationChildren_Tabbable
  • Iframe_Tabindex_Invalid
  • Img_Name_Redundant
  • Link_AdjacentHref_Redundant
  • Link_Name_Missing
  • Link_Name_WeakName
  • Link_VisualIndicator_Missing
  • Modal_Usage_Detect
  • Svg_ExplicitRole_Name_Missing
  • Svg_Name_Missing
  • Text_Contrast_TooLow
  • Text_LetterSpacing_Important_Detect

Check what rules run

To see what tests are being run use the --print-test-list flag on the CLI when running a scan.

% npx aetest scan --print-test-list "http://localhost:8080"
::: START AudioEye Accessibility Testing SDK CLI :::

Scanning HTML from STDIN

Rendered page content in 0.002 seconds
Running accessibility tests
Tests run in 0.049 seconds
The following rules were run...
Video_Controls_Missing
Video_Captions_Missing
Text_Contrast_TooLow
Svg_Name_Missing
Link_Name_Missing
Img_Name_Missing
Html_SkipLink_Missing
Html_Page_Title_Missing
Heading_Sequence_Wrong
... (additional rules omitted for brevity)
Aria_Attribute_Invalid

Total rules run: 96

AudioEye Rules Version: 11.0.35
Found 0 accessibility issues

Test results were written to aetest_output.html

::: END AudioEye Accessibility Testing SDK CLI :::

Describing a rule

If you need more details about a specific issue, you can use the describe command to get more information. For instance, for the result Img_Name_Missing you can find more information by running:

% npx aetest describe Img_Name_Missing
{
code: 'Img_Name_Missing',
description: 'We detected an image that is missing an accessible name. The accessible name of an image usually comes from the alt attribute or related ARIA properties and should be provided unless the image is deemed decorative. In the case where an image is unimportant or decorative, provide an alt attribute with an empty value. Otherwise, provide an appropriate alt attribute or related ARIA property for the image to possess an accessible name.',
fixAtSource: false,
fullName: 'Image accessible name is missing',
sourceFixGuidance: 'If the image is meaningful, add a descriptive label to the linked image. The label should describe the purpose of the image and any important visual details.\n' +
'\n' +
'For images using the `<img>` element, use the `alt` attribute:\n' +
'\n' +
'```html\n' +
'<a href="contact.html">\n' +
' <img src="contact.png" alt="Contact us">\n' +
'</a>\n' +
'```\n' +
'For images using the `<svg>` element, use the `aria-label` attribute:\n' +
'\n' +
'```html\n' +
'<a href="contact.html">\n' +
' <svg aria-label="Contact us">…</svg>\n' +
'</a>\n' +
'```\n' +
'\n' +
'If the image is not informative or redundant with adjacent text, mark the image as decorative.\n' +
'\n' +
'For images using the `<img>` element, use `alt=""`:\n' +
'\n' +
'```html\n' +
'<a href="contact.html">\n' +
' <img src="contact.png" alt="">\n' +
' Contact us\n' +
'</a>\n' +
'```\n' +
'For images using the `<svg>` element, use `aria-hidden="true"`:\n' +
'\n' +
'```html\n' +
'<a href="contact.html">\n' +
' <svg aria-hidden="true">…</svg>\n' +
' Contact us\n' +
'</a>\n' +
'```',
wcagSuccessCriteriaLevelCode: 'A',
wcagSuccessCriteriaName: 'Non-text Content',
wcagSuccessCriteriaNumber: '1.1.1'
}