Rules for XML Layouts

Link to Rules for XML Layouts copied to clipboard

Learn more about the accessibility rules supported within axe DevTools for Android. Below you'll find brief descriptions of each rule along with the link to the original guidelines. Rules come from two sources:

  1. WCAG Success Criterion
  2. Best Practice - defined by Accessibility Experts at Deque

In the navigation bar under Rules & Remediation for XML Layouts, you'll find detailed information on each rule, including resolution tips. View this guide for impact rating and descriptions. Some rules will be marked with an experimental badge. Learn more about experimental rules and how you can help improve them.

important

Throughout our rules documentation, you'll find references to Name, Role, and Value. Please refer to WCAG's definitions.

Rule Overview

Rule & Description Guidelines Impact
Active View Name

Active View Name
Active Views should provide a name to TalkBack.

WCAG 2.0 - 4.1.2 A Critical
CheckBox Name

CheckBox Name
CheckBox elements should have a name and value available to TalkBack.

WCAG 2.0 - 1.3.1 A Serious
Color Contrast

Color Contrast
Text elements should adequately contrast with their background.

WCAG 2.0 - 1.4.3 AA Serious
Edit Text Name

Edit Text Name
EditText controls require a name and value available to TalkBack.

WCAG 2.0 - 1.3.1 A Moderate
Edit Text Value

Edit Text Value
EditText controls require a name and value available to TalkBack.

WCAG 2.0 - 4.1.2 A Critical
Focusable Text

Focusable Text  Experimental Rule
Focusable Text identifies text elements and ensures they are available to TalkBack.

WCAG 2.0 - 1.3.2 A Critical
Hidden Active View Focus

Hidden Active View Focus
Interactive views must be clear from any overlapping views.

WCAG 2.0 - 2.4.3 A Critical
Hidden Informative View Focus

Hidden Informative View Focus
Informative views must be clear from any overlapping views.

WCAG 2.0 - 1.3.2 A Critical
ImageView Name

ImageView Name
ImageViews must provide a meaningful contentDescription.

WCAG 2.0 - 1.1.1 A Critical
Inactive Accessible View

Inactive Accessible View  Experimental Rule
Clickable views should include text and or a content description. They should also be accessibility focusable.

WCAG 2.0 - 4.1.2 A Critical
Label In Name

Label In Name
A view's name should be included or equal to its label.

WCAG 2.1 - 2.5.3 A Serious
Nested Active Control

Nested Active Control  Experimental Rule
An accessibility element should not have multiple active controls embedded within it.

WCAG 2.0 - 2.1.1 A Critical
Nested Element Name

Nested Element Name  Experimental Rule
Text within an accessibility element should be read by TalkBack.

WCAG 2.0 - 1.3.2 A Critical
Screen Orientation

Screen Orientation
Allow content to be displayed in any orientation.

WCAG 2.1 - 1.3.4 AA Serious
Screen Title

Screen Title
Each screen in an application should have a title.

WCAG 2.0 - 2.4.2 A Moderate
Switch Name

Switch Name
A switch should get its name from a nearby label.

WCAG 2.0 - 1.3.1 A Critical
Touch Target Size

Touch Target Size
Active controls must meet the minimum size requirements set forth by WCAG 2.1.

WCAG 2.1 - 2.5.5 AAA Moderate