---
title: Automated Accessibility Testing Rules
description: An overview of all the A11Y rules used during automated web accessibility
  testing.
source_url:
  html: https://testingbot.com/support/accessibility/web/rules
  md: https://testingbot.com/support/accessibility/web/rules/index.md
---
# Accessibility Web Testing Rules

Below is an overview of all the A11Y rules that TestingBot uses during automated web accessibility testing. Click a rule to see an explanation of the check and how to fix potential problems.

## Accessibility ruleset WCAG 2.0 Level A & AA Rules

| Rule ID | Description |
| --- | --- |
| [area-alt](https://testingbot.com/support/accessibility/web/rules/area-alt) | Ensure \<area\> elements of image maps have alternative text |
| [aria-allowed-attr](https://testingbot.com/support/accessibility/web/rules/aria-allowed-attr) | Ensure an element's role supports its ARIA attributes |
| [aria-braille-equivalent](https://testingbot.com/support/accessibility/web/rules/aria-braille-equivalent) | Make sure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent |
| [aria-command-name](https://testingbot.com/support/accessibility/web/rules/aria-command-name) | ARIA commands must have an accessible name |
| [aria-conditional-attr](https://testingbot.com/support/accessibility/web/rules/aria-conditional-attr) | Ensure ARIA attributes are used as described in the specification of the element's role |
| [aria-deprecated-role](https://testingbot.com/support/accessibility/web/rules/aria-deprecated-role) | Make sure elements do not use deprecated roles |
| [aria-hidden-body](https://testingbot.com/support/accessibility/web/rules/aria-hidden-body) | Make sure aria-hidden="true" is not present on the document body. |
| [aria-hidden-focus](https://testingbot.com/support/accessibility/web/rules/aria-hidden-focus) | Ensure aria-hidden elements are not focusable nor contain focusable elements |
| [aria-input-field-name](https://testingbot.com/support/accessibility/web/rules/aria-input-field-name) | Ensure every ARIA input field has an accessible name |
| [aria-meter-name](https://testingbot.com/support/accessibility/web/rules/aria-meter-name) | Make sure every ARIA meter node has an accessible name |
| [aria-progressbar-name](https://testingbot.com/support/accessibility/web/rules/aria-progressbar-name) | Every ARIA progressbar node must have an accessible name |
| [aria-prohibited-attr](https://testingbot.com/support/accessibility/web/rules/aria-prohibited-attr) | Ensure ARIA attributes are not prohibited for an element's role |
| [aria-required-attr](https://testingbot.com/support/accessibility/web/rules/aria-required-attr) | Make sure elements with ARIA roles have all required ARIA attributes |
| [aria-required-children](https://testingbot.com/support/accessibility/web/rules/aria-required-children) | Ensure elements with an ARIA role that require child roles contain them |
| [aria-required-parent](https://testingbot.com/support/accessibility/web/rules/aria-required-parent) | Make sure elements with an ARIA role that require parent roles are contained by them |
| [aria-roles](https://testingbot.com/support/accessibility/web/rules/aria-roles) | Ensure all elements with a role attribute use a valid value |
| [aria-toggle-field-name](https://testingbot.com/support/accessibility/web/rules/aria-toggle-field-name) | Make sure every ARIA toggle field has an accessible name |
| [aria-tooltip-name](https://testingbot.com/support/accessibility/web/rules/aria-tooltip-name) | Ensure every ARIA tooltip node has an accessible name |
| [aria-valid-attr-value](https://testingbot.com/support/accessibility/web/rules/aria-valid-attr-value) | Make sure all ARIA attributes have valid values |
| [aria-valid-attr](https://testingbot.com/support/accessibility/web/rules/aria-valid-attr) | Ensure attributes that begin with aria- are valid ARIA attributes |
| [blink](https://testingbot.com/support/accessibility/web/rules/blink) | Make sure \<blink\> elements are not used |
| [button-name](https://testingbot.com/support/accessibility/web/rules/button-name) | Ensure buttons have discernible text |
| [bypass](https://testingbot.com/support/accessibility/web/rules/bypass) | Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content |
| [color-contrast](https://testingbot.com/support/accessibility/web/rules/color-contrast) | Make sure each page has at least one mechanism for a user to bypass navigation and jump straight to the content |
| [definition-list](https://testingbot.com/support/accessibility/web/rules/definition-list) | Ensure \<dl\> elements are structured correctly |
| [dlitem](https://testingbot.com/support/accessibility/web/rules/dlitem) | Ensure \<dt\> and \<dd\> elements are contained by a \<dl\> |
| [document-title](https://testingbot.com/support/accessibility/web/rules/document-title) | Make sure each HTML document contains a non-empty \<title\> element |
| [duplicate-id-aria](https://testingbot.com/support/accessibility/web/rules/duplicate-id-aria) | Ensure every id attribute value used in ARIA and in labels is unique |
| [form-field-multiple-labels](https://testingbot.com/support/accessibility/web/rules/form-field-multiple-labels) | Ensure form field does not have multiple label elements |
| [frame-focusable-content](https://testingbot.com/support/accessibility/web/rules/frame-focusable-content) | Ensure \<frame\> and \<iframe\> elements with focusable content do not have tabindex=-1 |
| [frame-title-unique](https://testingbot.com/support/accessibility/web/rules/frame-title-unique) | Ensure \<iframe\> and \<frame\> elements contain a unique title attribute |
| [frame-title](https://testingbot.com/support/accessibility/web/rules/frame-title) | Make sure \<iframe\> and \<frame\> elements have an accessible name |
| [html-has-lang](https://testingbot.com/support/accessibility/web/rules/html-has-lang) | Ensure every HTML document has a lang attribute |
| [html-lang-valid](https://testingbot.com/support/accessibility/web/rules/html-lang-valid) | Ensure the lang attribute of the \<html\> element has a valid value |
| [html-xml-lang-mismatch](https://testingbot.com/support/accessibility/web/rules/html-xml-lang-mismatch) | Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page |
| [image-alt](https://testingbot.com/support/accessibility/web/rules/image-alt) | Ensure \<img\> elements have alternative text or a role of none or presentation |
| [input-button-name](https://testingbot.com/support/accessibility/web/rules/input-button-name) | Ensure input buttons have discernible text |
| [input-image-alt](https://testingbot.com/support/accessibility/web/rules/input-image-alt) | Ensure \<input type="image"\> elements have alternative text |
| [label](https://testingbot.com/support/accessibility/web/rules/label) | Ensure every form element has a label |
| [link-in-text-block](https://testingbot.com/support/accessibility/web/rules/link-in-text-block) | Ensure links are distinguished from surrounding text in a way that does not rely on color |
| [link-name](https://testingbot.com/support/accessibility/web/rules/link-name) | Ensure links have discernible text |
| [list](https://testingbot.com/support/accessibility/web/rules/list) | Ensure that lists are structured correctly |
| [listitem](https://testingbot.com/support/accessibility/web/rules/listitem) | Ensure \<li\> elements are used semantically |
| [marquee](https://testingbot.com/support/accessibility/web/rules/marquee) | Ensure \<marquee\> elements are not used |
| [meta-refresh](https://testingbot.com/support/accessibility/web/rules/meta-refresh) | Ensure \<meta http-equiv="refresh"\> is not used for delayed refresh |
| [meta-viewport](https://testingbot.com/support/accessibility/web/rules/meta-viewport) | Ensure \<meta name="viewport"\> does not disable text scaling and zooming |
| [nested-interactive](https://testingbot.com/support/accessibility/web/rules/nested-interactive) | Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies |
| [no-autoplay-audio](https://testingbot.com/support/accessibility/web/rules/no-autoplay-audio) | Ensure \<video\> or \<audio\> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio |
| [object-alt](https://testingbot.com/support/accessibility/web/rules/object-alt) | Ensure \<object\> elements have alternative text |
| [role-img-alt](https://testingbot.com/support/accessibility/web/rules/role-img-alt) | Ensure [role="img"] elements have alternative text |
| [scrollable-region-focusable](https://testingbot.com/support/accessibility/web/rules/scrollable-region-focusable) | Ensure elements that have scrollable content are accessible by keyboard |
| [select-name](https://testingbot.com/support/accessibility/web/rules/select-name) | Ensure select element has an accessible name |
| [server-side-image-map](https://testingbot.com/support/accessibility/web/rules/server-side-image-map) | Ensure that server-side image maps are not used |
| [summary-name](https://testingbot.com/support/accessibility/web/rules/summary-name) | Ensure summary elements have discernible text |
| [svg-img-alt](https://testingbot.com/support/accessibility/web/rules/svg-img-alt) | Ensure \<svg\> elements with an img, graphics-document or graphics-symbol role have an accessible text |
| [td-headers-attr](https://testingbot.com/support/accessibility/web/rules/td-headers-attr) | Ensure that each cell in a table that uses the headers attribute refers only to other \<th\> elements in that table |
| [th-has-data-cells](https://testingbot.com/support/accessibility/web/rules/th-has-data-cells) | Ensure that \<th\> elements and elements with role=columnheader/rowheader have data cells they describe |
| [valid-lang](https://testingbot.com/support/accessibility/web/rules/valid-lang) | Ensure lang attributes have valid values |
| [video-caption](https://testingbot.com/support/accessibility/web/rules/video-caption) | Ensure \<video\> elements have captions |

## Accessibility ruleset WCAG 2.1 Level A & AA Rules

| Rule ID | Description |
| --- | --- |
| [autocomplete-valid](https://testingbot.com/support/accessibility/web/rules/autocomplete-valid) | Ensure the autocomplete attribute is correct and suitable for the form field |
| [avoid-inline-spacing](https://testingbot.com/support/accessibility/web/rules/avoid-inline-spacing) | Ensure that text spacing set through style attributes can be adjusted with custom stylesheets |

## Accessibility ruleset WCAG 2.2 Level A & AA Rules

| Rule ID | Description |
| --- | --- |
| [target-size](https://testingbot.com/support/accessibility/web/rules/target-size) | Ensure touch targets have sufficient size and space |

## Best Practices

| Rule ID | Description |
| --- | --- |
| [accesskeys](https://testingbot.com/support/accessibility/web/rules/accesskeys) | Ensure every accesskey attribute value is unique |
| [aria-allowed-role](https://testingbot.com/support/accessibility/web/rules/aria-allowed-role) | Ensure role attribute has an appropriate value for the element |
| [aria-dialog-name](https://testingbot.com/support/accessibility/web/rules/aria-dialog-name) | Ensure every ARIA dialog and alertdialog node has an accessible name |
| [aria-text](https://testingbot.com/support/accessibility/web/rules/aria-text) | Make sure role="text" is used on elements with no focusable descendants |
| [aria-treeitem-name](https://testingbot.com/support/accessibility/web/rules/aria-treeitem-name) | Make sure every ARIA treeitem node has an accessible name |
| [empty-heading](https://testingbot.com/support/accessibility/web/rules/empty-heading) | Make sure headings have discernible text |
| [empty-table-header](https://testingbot.com/support/accessibility/web/rules/empty-table-header) | Ensure table headers have discernible text |
| [heading-order](https://testingbot.com/support/accessibility/web/rules/heading-order) | Ensure the order of headings is semantically correct |
| [image-redundant-alt](https://testingbot.com/support/accessibility/web/rules/image-redundant-alt) | Ensure image alternative is not repeated as text |
| [label-title-only](https://testingbot.com/support/accessibility/web/rules/label-title-only) | Make sure that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes |
| [landmark-banner-is-top-level](https://testingbot.com/support/accessibility/web/rules/landmark-banner-is-top-level) | Ensure the banner landmark is at top level |
| [landmark-complementary-is-top-level](https://testingbot.com/support/accessibility/web/rules/landmark-complementary-is-top-level) | Make sure the complementary landmark or aside is at top level |
| [landmark-contentinfo-is-top-level](https://testingbot.com/support/accessibility/web/rules/landmark-contentinfo-is-top-level) | Make sure the contentinfo landmark is at top level |
| [landmark-main-is-top-level](https://testingbot.com/support/accessibility/web/rules/landmark-main-is-top-level) | Ensure the main landmark is at top level |
| [landmark-no-duplicate-banner](https://testingbot.com/support/accessibility/web/rules/landmark-no-duplicate-banner) | Make sure the document has at most one banner landmark |
| [landmark-no-duplicate-contentinfo](https://testingbot.com/support/accessibility/web/rules/landmark-no-duplicate-contentinfo) | Ensure the document has at most one contentinfo landmark |
| [landmark-no-duplicate-main](https://testingbot.com/support/accessibility/web/rules/landmark-no-duplicate-main) | Make sure the document has at most one main landmark |
| [landmark-one-main](https://testingbot.com/support/accessibility/web/rules/landmark-one-main) | Ensure the document has a main landmark |
| [landmark-unique](https://testingbot.com/support/accessibility/web/rules/landmark-unique) | Ensure landmarks are unique |
| [meta-viewport-large](https://testingbot.com/support/accessibility/web/rules/meta-viewport-large) | Ensure \<meta name="viewport"\> can scale a significant amount |
| [page-has-heading-one](https://testingbot.com/support/accessibility/web/rules/page-has-heading-one) | Ensure that the page, or at least one of its frames contains a level-one heading |
| [presentation-role-conflict](https://testingbot.com/support/accessibility/web/rules/presentation-role-conflict) | Ensure elements marked as presentational do not have global ARIA or tabindex so that all screen readers ignore them |
| [region](https://testingbot.com/support/accessibility/web/rules/region) | Ensure all page content is contained by landmarks |
| [scope-attr-valid](https://testingbot.com/support/accessibility/web/rules/scope-attr-valid) | Make sure the scope attribute is used correctly on tables |
| [skip-link](https://testingbot.com/support/accessibility/web/rules/skip-link) | Ensure all skip links have a focusable target |
| [tabindex](https://testingbot.com/support/accessibility/web/rules/tabindex) | Make sure tabindex attribute values are not greater than 0 |
| [table-duplicate-name](https://testingbot.com/support/accessibility/web/rules/table-duplicate-name) | Make sure the \<caption\> element does not contain the same text as the summary attribute |
| [color-contrast-enhanced](https://testingbot.com/support/accessibility/web/rules/color-contrast-enhanced) | Ensure the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds |
| [identical-links-same-purpose](https://testingbot.com/support/accessibility/web/rules/identical-links-same-purpose) | Ensure that links with the same accessible name serve a similar purpose |
| [meta-refresh-no-exceptions](https://testingbot.com/support/accessibility/web/rules/meta-refresh-no-exceptions) | Ensure \<meta http-equiv="refresh"\> is not used for delayed refresh |

## Experimental Rules

| Rule ID | Description |
| --- | --- |
| [css-orientation-lock](https://testingbot.com/support/accessibility/web/rules/css-orientation-lock) | Make sure content is not locked to any specific display orientation, and the content is operable in all display orientations |
| [focus-order-semantics](https://testingbot.com/support/accessibility/web/rules/focus-order-semantics) | Ensure elements in the focus order have a role appropriate for interactive content |
| [hidden-content](https://testingbot.com/support/accessibility/web/rules/hidden-content) | Inform users about hidden content. |
| [label-content-name-mismatch](https://testingbot.com/support/accessibility/web/rules/label-content-name-mismatch) | Ensure that elements labelled through their content must have their visible text as part of their accessible name |
| [p-as-heading](https://testingbot.com/support/accessibility/web/rules/p-as-heading) | Make sure bold, italic text and font-size is not used to style \<p\> elements as a heading |
| [table-fake-caption](https://testingbot.com/support/accessibility/web/rules/table-fake-caption) | Ensure that tables with a caption use the \<caption\> element. |
| [td-has-header](https://testingbot.com/support/accessibility/web/rules/td-has-header) | Ensure that each non-empty data cell in a \<table\> larger than 3 by 3 has one or more table headers |

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
