UI Accessibility Checker

Contents

Overview

Requirements

How do I use AccChecker?

Workflow

Architecture

The AccChecker GUI (AccCheckUI.exe)

Verifications Tab

Results Tab

Screen Reader Tab

Tree Tab

File Menu

Verifications Menu

The AccChecker API

AccChecker API Example

The AccChecker Console (AccCheckConsole.exe)

Command-line Syntax

Command-line Example

Verification Routines

Consistency

Screen Reader

Navigation

Tree Depth Check

Check Tabbing

Properties

CheckRole

CheckState

CheckName

CheckAccessKeys

CheckBoundingRect

Tree

CheckNavigate

CheckParentChild

HitTesting

Custom Verifications

Verification Log Messages

Navigation – Check Tabbing

Error - AppearsToNotSupportTabbing

Error -MissingItemInTabOrder

Error - TabbingNotCyclic

Error - TabbingNotSymmetric

Error - TabbedToUnknownElement

Information - TabOrderInQuestion

Information - StartingTab

Information - TabbedBackwardTo

Information - TabbedForwardTo

Information - TabbedToInfo

Navigation – Tree Depth Check

Error - TreeMightBeCyclic

Warning - TreeTooDeep

Information - CheckTreeDepth

Properties – Check Role

Error - InvalidRole

Error - VariantNotInt

Error - ControlShouldHaveValue

Error - CustomControlTypeWithoutLocalizedControlType

Properties – Check State

Error - VariantNotInt

Error - InconsistentState, InconsistentProperties

Warning - ElementShouldBeOffScreen

Properties – Check Name

Error - ElementHasNoName

Error - AccNameLengthTooLong, UiaNameLengthTooLong

Error - AccNameContainsInvalidString

Warning - AccNameShouldNotContainRole, UiaNameShouldNotContainControlType

Error – DragPattern/DragDropPattern elements requires Name

Error – DragPattern/DragDropPattern elements requires DropEffect

Properties – CheckAccessKeys

Error - DuplicateAccessKey, UiaDuplicateAccessKey

Properties – CheckBoundingRect

Error - BoundingRectIsIncorrect

Warning - BoundingRectNotHitTestable

Error - ControlTypeRequiredPatternNotSupported

Error - ControlTypeNoExpectedPatternsSupported

Tree – Check Navigate

Error - AccNavigate_ReturnedElementWithIncorrectParent

Error - Navigation_ReturnedElementWithIncorrectParent

Error - IncorrectRoundTrip

Warning - UiaElementDoesNotParentToRoot

Warning - TooManyChildren

Tree – Check ParentChild

Error - ElementIsNotChildOfElementsParent

Error - ElementsChildHasDifferentParent

Error - NullParent

Error - ElementIsChildOfParentMulipleTimes

Error - FirstChildLastChildMismatch

Warning - MethodReturnedUnexpectedHResult

Tree – HitTesting

Error - AccessibleObjectFromPointReturnedNullIAccessible, ElementFromPointReturnedNull

Error - AccessibleObjectFromPointReturnedNullChildId

Error - ElementIsOrphaned, UiaElementIsOrphaned

Warning - AccessibleObjectFromPointReturnedNot_S_OK

Miscellaneous Errors

Warning – GatheringElement

Error - DuplicateSiblingNames

Error - DuplicateSiblingIDs

Error - UnexpectedTestError

Error - MemberNotImplememented

Error – MethodExceptionOccured

# Overview

The UI Accessibility Checker (AccChecker) tool verifies that key user interface (UI) accessibility requirements are met in the design and implementation of UI Automation (UIA) or Microsoft Active Accessibility (MSAA) regardless of the underlying UI framework. AccChecker also includes a set of web accessibility verifications.

# Requirements

.NET Framework 2.0 or later.

# How do I use AccChecker?

## Workflow

The following scenario describes a typical test workflow that incorporates AccChecker.

1. Run AccChecker verifications against the application or control of interest.

The AccChecker target is selected by one of the following methods:

- From the Choose window from list dropdown
- Hovering and pressing CTRL+SHIFT+[
- Specifying the HWND of the control

Figure 1: The AccChecker target selector.

Note: AccChecker does not explore all UI permutations in an application. Elements hidden within controls such as windows, panes, tabs, and menus must be exposed manually.

2. Examine the AccChecker error log and assess or triage the results. Fix trivial issues and log severe bugs as appropriate.
3. Generate a suppression file for bugs and errors that can be ignored until regression testing.
4. Re-run AccChecker verifications with suppression file and initial bug fixes. This provides a snapshot of the issues in the current implementation of Active Accessibility and establishes a baseline for regression testing.
5. Integrate the AccChecker APIs and suppression file into an automated test framework for regression testing on bugs logged from the initial AccChecker verifications.

Note: As bugs are fixed, the suppression file should be modified as required.

6. Confirm that no regressions or new accessibility bugs have been introduced into the application or control.

## Architecture

The AccChecker architecture incorporates three levels, or stages, of functionality:

1. A Windows graphical user interface (GUI) application designed to support manual testing, message logging, and suppression generation.

2. An application programming interface (API) designed for use in automated testing frameworks.

3. A console application that supports unmanaged test automations typically unable to utilize the AccChecker managed API.

All versions of AccChecker provide similar functionality through verification routines that include Active Accessibility programmatic access, programmatic event generation, control layout and keyboard navigation validation, and a basic screen reader transcription service.

Note: When AccChecker verification routines are executing, user interaction with the host machine can interfere with some routines. Therefore, it is highly recommended that no further user interaction should occur until AccChecker notifies the user that all tasks are complete.

### The AccChecker GUI (AccCheckUI.exe)

#### Verifications Tab

Figure 2: The AccChecker Verifications tab.

AccChecker starts with the default view of the Verifications tab. This tab contains the following components:

· The verification target selector has three options for selecting an application or control.

1. Choose a target from the pre-populated drop-down list. This list contains all top-level HWNDs identified at start-up.

2. Choose an HWND based on mouse cursor location (The selectable controls are highlighted with a red rectangle). This option provides more granularity with respect to control selection because any visible object with an HWND can be selected.

3. The final option allows a specific HWND to be entered manually.

· The verification routines checklist.

This checklist provides the ability to select the desired verification routine to be performed against an application or control. See Verification Routines for more information.

· The error and warning suppression file selector.

Suppression files are generated from the verification results tab. By right-clicking on an error or warning message and selecting “Suppress” from the context menu, a flag is set for that specific message. If the Suppressions check box is checked suppressed entries will appear in the list. Any suppressed entry can be unsuppressed by using the same context menu that used to suppress it. A suppression file is saved in .xml format by selecting “Save Suppression” from the “File” menu; this file is consumed on subsequent verification runs where the messages will be hidden. To remove the suppression file, click the Clear button. See Verification Log Messages for more information on specific messages. The entire list can be saved as a log file in either xml or as formatted text file that is easy to read by selecting “Save Log” from the file menu.

Figure 3: The AccChecker Results tab with the "Suppress" context item highlighted.

The following shows the content of a suppression file generated by running the “Properties” verifications on the Windows Firewall control panel (CPL) application. The error with ID of “ElementHasNoName” was chosen for suppression in this example.

`<?xml` `version="1.0" encoding="utf-8"?><ArrayOfLogEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">`

`<LogEvent>`

`<EventID>ElementHasNoName</EventID>`

`<Text>Element has no name</Text>`

`<ParentChain>Windows Firewall.Windows Firewall</ParentChain>`

`<VerificationRoutine>VerificationRoutines.CheckName</VerificationRoutine>`

`<Classname>ATL:BUTTON</Classname>`

`<AccName />`

`<AccRole>PushButton</AccRole>`

`</LogEvent>`

`</ArrayOfLogEvent>`

· The ‘Run Verifications’ button and progress bar.

Invoke this button to initiate the verification process. While the selected verification are running the ‘Run Verification’ button becomes ‘Cancel Verifications’ and can be invoked to stop the verifications after the current one completes.

#### Results Tab

The Results tab is populated upon completion of the selected verification tasks; it consists of two components:

1. The message list, which displays the error, warning, and informational messages generated by the selected verification tasks. The messages displayed can be filtered by type using the checkboxes above the message list.

2. The message details and a screen capture of the verification target. Selecting a message from the message list will display further details and highlight the element of interest in the screen capture. The Visualize button, when clicked, switches AccChecker to the Tree tab. If an error is highlighted on the Results tab, the corresponding element is highlighted on the Tree tab.

Right-clicking on a message exposes three context menu items.

1. Suppress - Adds the message to the suppression list.
2. Copy to clipboard - Copies the message details to the clipboard.
3. Help - Displays the AccChecker help file, that contains additional information about the message.

### Screen Reader Tab

The Screen Reader tab displays a transcript of a simulated traversal of the verification target by a screen reader. Elements are navigated and logged just as a screen reader would read them.

The information presented on this tab is essential to confirm that only useful and relevant information is being announced. For example, a normal-sounding control name such as "MenuItem Edit" or "PushButton Close" is acceptable; however, a control name that doesn't intrinsically make sense such as "CPNavPanel22" or "DefaultValue1" is not acceptable.

The Visualize button, when clicked, causes AccChecker to switch to the Tree tab. If an element is highlighted on the Screen Reader tab, the corresponding element is highlighted on the Tree tab.

Figure 4: The AccChecker Screen Reader tab displaying a sample verification of Notepad.

Note: The Screen Reader verification routine under Consistency must be selected for this tab to be displayed.

#### Tree Tab

Running any verification routine causes AccChecker to compile all visible elements in the verification target and display them hierarchically on this tab.

Figure 2: The AccChecker Tree tab.

#### File Menu

##### Open DLL

Opens a verification DLL.

Native AccChecker verifications are encapsulated in a standalone DLL (VerificationRoutines.dll). This design allows test teams to create their own set of verifications based on the UI platform being tested, storSave Log

##### Save Log

Save the verification log as XML or as plain text. Plain text is more readable.

##### Save Suppression

Save the suppression log as XML.

This file is used to specify the verification messages to ignore in regression testing.

#### Verifications Menu

##### Run Now

Run the verification routines as specified for the chosen verification target.

##### Enable All/ Disable All

Check or uncheck all verification routine checkboxes.

#### Help Menu

##### Help

Display help topics for UI Accessibility Checker.

##### About

Display the software version and copyright information for UI Accessibility Checker.

### The AccChecker API

The AccChecker API is designed to support automated testing. Once an application has been screened using manual testing with the AccChecker GUI, automated tests can be written that incorporate the message and suppression logs created with the GUI tool.

#### AccChecker API Example

The following code snippet demonstrates how to use the AccChecker API to test tabbing functionality in the Windows Firewall control panel application.

Note: A Microsoft Visual Studio 2008 solution that contains verification sample code is included with the help documentation. The solution files are located in the AccChecker help folder of the AccChecker installation path.

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using AccCheck.Logging;

    public class TestCases : TestBase

    {

        public void AccessibilityTestCase()

        {

            //  get our user interface ready for AccChecker

            Setup();

            //  AccChecker's class representing verifications that you can run

            AccCheck.Verification.VerificationManager vm = new AccCheck.Verification.VerificationManager();

            //  create a console logger to get output in the console

            ConsoleLogger consoleLogger = new ConsoleLogger();

            //  add AccChecker's Console Logger

            vm.AddLogger(consoleLogger);

            //  disable all verifications

            vm.DisableVerifications(AccCheck.Verification.VerificationFilter.All);

            // enable the ones we want to run

            vm.EnableRoutine("CheckTabbing");

            //  run it against the firewall

            vm.ExecuteEnabled(_fireWallHwnd);

            //  check if the verification failed by looking at the logger

            if (consoleLogger.ErrorCount > 0)

            {

                Console.WriteLine("Test failed!");

                Console.WriteLine("Error count = " + consoleLogger.ErrorCount);

            }

            // cleanup our user interface

            Cleanup();

        }

    }

### The AccChecker Console (AccCheckConsole.exe)

Figure 5: The AccChecker console application.

The command-line accepts a variety of inputs (such as HWND, window title, and verification routine) and supplies an exit code that corresponds to the error log count.

#### Command-line Syntax

AccCheckConsole [options] (-hwnd <hwnd> | -process <name>) [<dlls>]

Options:

-hwnd <hwnd> Validates the given hwnd. Can be hex or dec.

-window <title> Validates the window with the title given.

-process <name> Validates the main window of the process with that name.

-list Lists all the verification routines available.

-enable <name> Runs the given routine. Can be specified more than once

-disable <name> Runs all but the given routine. Can be specified more than once

-log (info|warn|err) The lowest event rating that will be logged.

-logfile <file> Outputs the log to file. Can be used multiple times.

-suppress <file> Uses the XML file <file> to suppress errors.

-quiet No logging to stdout.

-help Quick Help.

#### Command-line Error Codes

Error codes returned from AccCheckConsole when using "echo %errorlevel%"

0 - No errors and no warnings.

1 - Usages statement was requested.

2 - Errors and no warnings.

3 - Errors and warnings.

4 - No errors but Warnings.

5 - Invalid command line.

#### Command-line Example

1) Run all verifications on a window with a specified name.

AccCheckConsole -window "Untitled - Notepad"

2) Run a subset of the verifications against an HWND, specifying a suppression file.

AccCheckConsole -hwnd 0x00382f00 -enable CheckTabbing -enable CheckName -suppress suppress.xml

3) Run all verifications from a new verification DLL.

AccCheckConsole -window "Untitled - Notepad" VerificationRoutine1.dll

# Verification Routines

## Consistency

### Screen Reader

This verification routine compiles all visible elements in the verification target and displays them in a ListView control in the order that a standard screen reader announces them to a user.

## Navigation

### Tree Depth Check

This verification routine sends TAB (or SHIFT-TAB) characters as input to the verification target to confirm that the UI of the verification target is not overly complex or inaccessible using standard keyboard navigation.

### Check Tabbing

This verification routine sends TAB (or SHIFT-TAB) characters as input to the verification target to confirm that all focusable elements in the UI are reachable in an orderly, logical fashion using standard keyboard navigation.

## Properties

### CheckRole

This verification routine confirms that each focusable element in the UI reports a valid, logical Active Accessibility role and that the control has a value as required by that role.

### CheckState

This verification routine confirms that each focusable element in the UI reports a valid, logical Active Accessibility state.

### CheckName

This verification routine confirms that each focusable element in the UI reports a valid, logical Active Accessibility name.

### CheckAccessKeys

This verification routine confirms that access keys are assigned to elements in the verification target are unique within the verification target.

### CheckBoundingRect

This verification routine confirms that each focusable element in the UI has a bounding rectangle that can be used as a target for hit testing.

## Tree

### CheckNavigate

This verification routine uses the IAccessible::accNavigate method to confirm that navigation between parent, child, and sibling elements is consistent and predictable.

### CheckParentChild

This verification routine confirms parent and child relationships in the element tree are consistent and predictable.

### HitTesting

This verification routine confirms that all elements at the coordinates specified by using AccessibleObjectFromPoint are valid and within the verification target.

# Custom Verifications

For more information (including sample code) on how to create verification routines for alternate test frameworks, please see the Creating Custom Verifications help document.

# Verification Log Messages

## Navigation – Check Tabbing

### Error - AppearsToNotSupportTabbing

#### The application appears to not support tabbing.

This error indicates that standard keyboard navigation (TAB or SHIFT-TAB) is not supported by the application.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation for the following reasons:

1. No elements within the application will be discoverable.

Possible causes for this error:

1. The UI framework of the application does not support MSAA.

2. MSAA is not implemented on any control within the application.

Related Resources

Guidelines for Keyboard User Interface Design

### Error - MissingItemInTabOrder

#### This element appear to be tabbable but is not in the tab order

This error indicates that a focusable element is not accessible using standard keyboard navigation (TAB or SHIFT-TAB). For example, the element has not been marked as a tab stop or assigned a tab index.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation for the following reasons:

1. The element will not be discoverable.

2. If the element is a child of a custom list control, cues to signify the child element can be navigated using the ARROW or PAGE keys may be missing.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility role set inappropriately. For example, if each list item in a list view control is not exposed through Active Accessibility as a ROLE_SYSTEM_LISTITEM then the verification fails because the list items are not accessible using the TAB key.

2. The element, or its parent, is a custom control that does not implement tabbing functionality correctly. For example, the Active Accessibility State property is never set to STATE_SYSTEM_FOCUSABLE.

3. An element was selected for verification that acts as a container for other elements and does not support keyboard navigation itself. For example, a toolbar and its child elements are not accessible using the TAB key.

Related Resources

Guidelines for Keyboard User Interface Design

### Error - TabbingNotCyclic

#### The tabbing in this application is not cyclic. Tabbing forwards or backwards {0} times doesn't come back to the same control

This error specifies that, when using standard keyboard navigation (TAB or SHIFT-TAB), it is not possible to traverse the element tree of the verification target such that the starting element becomes the ending element (using the same number of keystrokes) should the direction of traversal be reversed. For example, tabbing forward (TAB) x times from element A(0) to element A(x) and then tabbing backward (SHIFT-TAB) x times does not result in element A(0) regaining focus.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because there is no predictable way to return to a control once it has been visited.

Possible causes for this error:

1. The element, or parent, is a custom control that does not implement tabbing functionality correctly. For example, the Active Accessibility State property is not set correctly.

2. Certain applications, such as the Notepad, may exhibit this behavior innately.

Related Resources

Guidelines for Keyboard User Interface Design

### Error - TabbingNotSymmetric

#### Tabbing backwards and forwards does not yield the same element. Expected {0} but received {1}

This error specifies that, when using standard keyboard navigation (TAB or SHIFT-TAB), it is not possible to repeat the path of traversal through the element tree of the verification target should the direction of traversal be reversed. For example, tabbing forward (TAB) x times from element A(0) to element A(x) and then tabbing backward (SHIFT-TAB) x times results in element A(0) regaining focus via a different set of intermediate elements.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because traversing elements appears erratic and unpredictable.

Possible causes for this error:

1. Multiple elements, or their parents, are custom controls that do not implement tabbing functionality correctly. For example, the Active Accessibility State property is not set correctly.

Related Resources

Guidelines for Keyboard User Interface Design

### Error - TabbedToUnknownElement

#### Tabbing has gone to an element outside the target hwnd.

This error indicates that using standard keyboard navigation (TAB or SHIFT-TAB) causes focus to shift outside the HWND of the verification target.

Note: AccChecker moves up the element tree to the top-level HWND for the chosen verification target prior to running any verification tasks. This reduces the number of spurious errors generated if an HWND chosen for verification is part of a more complex client area.

Possible causes for this error:

1. The verification target does not require tabbing to be implemented in order to provide full functionality.

2. User interaction during verification, such as moving focus to a non-target HWND, interfered with the verification process.

### Information - TabOrderInQuestion

#### Tab order may be not following standard Windows Guidelines

This informational message indicates that using standard keyboard navigation (TAB or SHIFT-TAB) exposes a non-standard tab order. For example, depending on local system settings, tab order typically mimics reading order.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because traversing elements might be erratic and unpredictable.

Related Resources

Guidelines for Keyboard User Interface Design

Windows User Experience Interaction Guidelines – Keyboard

### Information - StartingTab

#### _accessibilityFramework.GetName(focusEvent.ixElement)

This informational message identifies the starting element for the verification task.

### Information - TabbedBackwardTo

#### _accessibilityFramework.GetName(focusEvent.ixElement)

This informational message identifies the element that receives focus when tabbing backwards (SHIFT-TAB).

### Information - TabbedForwardTo

#### _accessibilityFramework.GetName(focusEvent.ixElement) + " expecting " + _accessibilityFramework.GetName((object)_tabbableElements[tabIndex].GetFriendlyPath()) + DisplayPath(currentElement) + " expecting " + DisplayPath(_tabbableElements[tabIndex])

This informational message identifies the element that receives focus when tabbing forwards (TAB).

### Information - TabbedToInfo

#### Throwing away extra focus event

This informational message indicates that multiple focus events were fired by a single element when using standard keyboard navigation (TAB or SHIFT-TAB). The spurious events are discarded.

#### Back to the beginning

This informational message indicates that focus shifted back to the starting element in the tab order. Tabbing was terminated at this element because the tab order appears circular.

## Navigation – Tree Depth Check

### Error - TreeMightBeCyclic

#### Tree is {0} levels deep. This might indicate that the accessibility tree is cyclic, and thus it would appear to be infinite.

This error indicates that the element tree is cyclic and the tree depth might be infinite.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because there will be no apparent limit to the traversal of elements in the target application.

Possible causes for this error:

1. Multiple elements, or their parents, are custom controls that do not implement tabbing functionality correctly. For example, the Active Accessibility State property is not updated correctly.

Related Resources

Guidelines for Keyboard User Interface Design

Windows User Experience Interaction Guidelines – Keyboard

### Warning - TreeTooDeep

#### Tree is {0} levels deep.

This warning indicates that the element tree might be too deep.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because traversing elements will seem to take a long time and may appear cyclic.

Possible causes for this warning:

1. Multiple elements, or their parents, are custom controls that do not implement tabbing functionality correctly. For example, the Active Accessibility State property is not updated correctly.

2. Application UI is overly complex.

Related Resources

Guidelines for Keyboard User Interface Design

Windows User Experience Interaction Guidelines – Keyboard

### Information - CheckTreeDepth

#### Tree is {0} levels deep.

This informational message indicates the depth of the element tree for the verification target.

Related Resources

Guidelines for Keyboard User Interface Design

Windows User Experience Interaction Guidelines – Keyboard

##

## Properties – Check Role

### Error - InvalidRole

#### The int returned from get_accRole is not a valid role constant, ie ROLE_SYSTEM_*

This error indicates that an element is reporting an invalid Active Accessibility role. For example, the get_accRole method used to retrieve the Active Accessibility role of an element returns an integer value that does not map to a valid object role constant (such as ROLE_SYSTEM_LISTITEM).

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because elements may be incorrectly identified to the user.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility role set inappropriately.

Related Resources

IAccessible::get_accRole

Object Roles

### Error - VariantNotInt

#### The variant returned from {0} should be an {1} but is a {2}.

This error indicates that an element is reporting an invalid Active Accessibility role. For example, the get_accRole method used to retrieve the Active Accessibility role of an element should return an integer value that represents one of the Active Accessibility role constants but is returning another variant instead.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because elements may be incorrectly identified to the user.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility role set inappropriately.

Related Resources

IAccessible::get_accRole

Object Roles

### Error - ControlShouldHaveValue

#### A control with role of {0} should have a value but get_accValue is not implemented

This error indicates that an element does not supply a value as expected based on the Active Accessibility role assigned implying that the element does not have the get_accValue method implemented. For example, the following Active Accessibility roles should all supply a value:

· ROLE_SYSTEM_COMBOBOX

· ROLE_SYSTEM_SLIDER

· ROLE_SYSTEM_LINK

· ROLE_SYSTEM_TEXT

· ROLE_SYSTEM_SPINBUTTON

· ROLE_SYSTEM_SCROLLBAR

· ROLE_SYSTEM_PROGRESSBAR

· ROLE_SYSTEM_OUTLINEITEM

· ROLE_SYSTEM_IPADDRESS

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an element that has an intrinsic value must be able to report that value to a user.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility role set inappropriately.

Related Resources

IAccessible::get_accRole

Object Roles

### Error - CustomControlTypeWithoutLocalizedControlType

#### Element doesn't have the LocalizedControlType property set

This error indicates that the element's LocalizedControlType property is not set.

Note: Most screen readers read the localized control type to describe the element’s nature. If the localized control type is not set, a screen reader falls back to reading the main control type, which is always in English and may not make sense to all users.

Possible causes for this error:

1. LocalizedControlType property is not set.

2. The ControlType property is not set correctly.

Related Resources

The LocalizedControlType Property

LocalizedControlType property identifier

## Properties – Check State

### Error - VariantNotInt

#### The variant returned from {0} should be an {1} but is a {2}.

This error indicates that an element is reporting an invalid Active Accessibility state. For example, the get_accState method used to retrieve the Active Accessibility states of an element should return an integer value that represents one of the Active Accessibility state constants but is returning another variant instead.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an incorrect element state may be reported to the user.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility state set inappropriately.

Related Resources

IAccessible::get_accState

Object State Constants

###

### Error - InconsistentState, InconsistentProperties

#### A control has states/properties that are inconsistent {0} and {1}

This error indicates that an element is reporting inconsistent or conflicting Active Accessibility states or UI Automation properties. For example, when the get_accState method returns any of the following combinations:

· STATE_SYSTEM_EXPANDED and STATE_SYSTEM_COLLAPSED

· STATE_SYSTEM_SELECTED and not STATE_SYSTEM_SELECTABLE

· STATE_SYSTEM_FOCUSED and not STATE_SYSTEM_FOCUSABLE.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an incorrect element state may be reported to the user.

Possible causes for this error:

1. The element, or its parent, has an Active Accessibility state set inappropriately.

Related Resources

IAccessible::get_accState

Object State Constants

MSAA and UIA states and properties

###

### Warning - ElementShouldBeOffScreen

#### Element should be offscreen

· This warning indicates that the bounding rectangle of the element is clipped by the bounding rectangle of its parent element. The element should be ignored and considered outside the bounds of the desktop.

Related Resources

IAccessible::get_accName

Name Property

## Properties – Check Name

### Error - ElementHasNoName

#### Element has no name

This error indicates that an element does not have a name. For example, the element does not have accName implemented and an empty string is returned when the get_accName method is used to retrieve the Active Accessibility name of the element.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an element may be incorrectly identified to the user.

Possible causes for this error:

1. The element, or its parent, has no name or label.

2. The element is assigned an accRole that suggests the element have a name.

3. The element that has focus should not receive focus. For example, a label or a disabled control.

4. An invisible control has received focus.

Related Resources

IAccessible::get_accName

Name Property

### Error - AccNameLengthTooLong, UiaNameLengthTooLong

#### Element's name should not return a string longer than {0} characters

This error indicates that the name of an element contains too many characters. For example, the get_accName method used to retrieve the Active Accessibility name of an element returns a string greater than the limit of 32000 characters.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an element may have an unpronounceable, non-intuitive name.

Possible causes for this error:

1. The element, or its parent, has an incorrectly assigned name or label.

Related Resources

IAccessible::get_accName

Name Property

UIA_NamePropertyId identifier

AutomationElement.NameProperty

###

### Error - AccNameContainsInvalidString

#### accName should not contain the string {0}

· This error indicates that the name of an element contains invalid characters (these characters are replaced by AccChecker). For example, the get_accName method used to retrieve the Active Accessibility name of an element returns a string that contains tab, newline, or ampersand characters.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because an element may have an unpronounceable, non-intuitive name.

Possible causes for this error:

1. The element, or its parent , has an incorrectly assigned name or label.

Related Resources

IAccessible::get_accName

Name Property

###

### Warning - AccNameShouldNotContainRole, UiaNameShouldNotContainControlType

#### Element's Name ({0}) should not contain the text of the Element's Role/ControlType ({1})

This error indicates that the name of an element incorporates its Role/ControlType.

For example, when the get_accName method, used to retrieve the Active Accessibility name of an element, returns “ROLE_SYSTEM_SCROLLBAR_*”. Or when UIA Name property for an element with Button Control Type is set to "My Button".

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because control type will be read twice or it may even be unpronounceable or non-intuitive for users.

Possible causes for this error:

1. The element, or its parent, has an incorrectly assigned name or label.

2. The element, or its parent, has a default name that has not been revised to a friendly name. For example, button1.

3. A developer is not aware that screen readers read names and control types.

Related Resources

IAccessible::get_accName

Name Property

UIA_NamePropertyId identifier

AutomationElement.NameProperty

### Error – DragPattern/DragDropPattern elements requires Name

#### Element's that support Drag/Drop should have a valid 'Name' set

This error indicates that the element supports either IUIAutomationDragPattern or IUIAutomationDropTargetPattern but does not have a valid Name set.

Note: This is an issue for people who rely on a screen-reader. The user will not be able to tell what this object is since the screen read will not read out a valid name to distinguish what this element is when dragging.

Possible causes for this error:

1. The element, or its parent, has an incorrectly assigned name or label.

2. A developer is not aware that screen readers read names and control types.

Related Resources

IAccessible::get_accName

Name Property

UIA_NamePropertyId identifier

AutomationElement.NameProperty

### Error – DragPattern/DragDropPattern elements requires valid DropEffect

### Element's that support Drag/Drop should have a valid 'DropEffect' set

This error indicates that the element supports either IUIAutomationDragPattern or IUIAutomationDropTargetPattern but does not have a valid DropEffect property set.

Note: This is an issue for people who rely on a screen-reader. The user will not be able to tell what effect this object has when dragging.

Possible causes for this error:

1. The element, or its parent, has not created the DropEffect(s) properties.

2. A developer is not aware that screen readers read DropEffect(s).

Related Resources

##

## Properties – CheckAccessKeys

### Error - DuplicateAccessKey, UiaDuplicateAccessKey

#### There is a sibling Automation Element that has the same access key / accelerator key

This error specifies that the access/accelerator key assigned to the element is also assigned to another element in the verification target.

Note: This is an issue for people who rely on the keyboard for navigation because multiple elements may be invoked or cycle focus using the same shortcut or accelerator key.

Related Resources

IAccessible::get_accKeyboardShortcut

KeyboardShortcut Property

IAccessible::get_accName

UIA_NamePropertyId identifier

AutomationElement.NameProperty

AcceleratorKeyProperty, AccessKeyProperty

UIA_AcceleratorKeyPropertyId, UIA_AccessKeyPropertyId identifiers

## Properties – CheckBoundingRect

### Error - BoundingRectIsIncorrect

#### The {0} edge of the reported rectangle is inconsistent with hit testing {1} the rect at point {2}.

This error specifies that the bounding rectangle of the element is not consistent with expected hit testing results. For example, hit testing a point outside the bounding rectangle of the element does not return a different element.

Related Resources

IAccessible::accHitTest

AccessibleObjectFromPoint Function

### Warning - BoundingRectNotHitTestable

#### The reported rectangle does not appear to contain a point where this element can be retrieved with hit testing. [KB1]

This warning indicates that the bounding rectangle of the element is not reachable by hit testing. For example, it lies outside the physical screen coordinates (or viewable region) of the desktop.

Related Resources

IAccessible::accHitTest

AccessibleObjectFromPoint Function

### Error - ControlTypeRequiredPatternNotSupported

#### Element with a ControlType of {0} should support {1} but this element does not

This error indicates that the element's UI Automation support does not comply with the UI Automation specification because the element should support the provided list of control patterns, but does not. As a result, this element might not be properly exposed to assistive technologies which could have a serious impact on user experience.

1. Incomplete UI Automation implementation.

2. The ControlType property is not set correctly

Related Resources

UI Automation Control Types Overview

UI Automation Control Patterns Overview

### Error - ControlTypeNoExpectedPatternsSupported

#### Element with a ControlType of {0} should support at least one of these patterns:{1} but this element does not

This error indicates that the element's UI Automation support does not comply with the UI Automation specification because the element should support at least one of the provided list of control patterns, but does not. As a result, this element might not be properly exposed to assistive technologies, which could have a serious impact on user experience.

Possible causes for this error:

1. Incomplete UI Automation implementation.

2. The ControlType property is not set correctly

Related Resources

UI Automation Control Types Overview

UI Automation Control Patterns Overview

##

## Tree – Check Navigate

### Error - AccNavigate_ReturnedElementWithIncorrectParent

#### Calling accNavigate((Live Search), 0, NAVDIR_FIRSTCHILD) which returned (x-gadget:///gadget.html) returned the incorrect parent([NULL]) and not (Live Search)

This error indicates that when get_accParent is called on the child element returned by accNavigate (using either the NAVDIR_FIRSTCHILD or NAVDIR_LASTCHILD navigation constants) the parent element returned does not match the parent element specified in the accNavigate call.

Figure 6: Example of an invalid Active Accessibility implementation that returns an incorrect parent element.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accNavigate

IAccessible::get_accParent

### Error - Navigation_ReturnedElementWithIncorrectParent

#### When navigating by calling {0} from the tested node, and then repeatedly calling {1}, the following child was found: {2}. The child reported its parent is {3}. Instead, the child should report as its parent the testing node.

This error indicates that for the given element the Parent call on a child element returns an element that is deferent from the given tested element.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid UI Automation implementation.

Related Resources

IUIAutomationElement::GetCachedParent Method

IUIAutomationTreeWalker Interface

###

### Error - IncorrectRoundTrip

#### Call to accNavigate((Click Snooze to be reminded again in:), 1, NAVDIR_NEXT), then accNavigate((Open), 2, NAVDIR_PREVIOUS), should have returned Click Snooze to be reminded again in:(ChildId=1), but returned Click Snooze to be reminded again in:

This error indicates that using accNavigate to traverse the element tree of the verification target does not return the same starting element when the direction of traversal is reversed.

Figure 7: Example of an invalid Active Accessibility implementation that has caused incorrect round-trip navigation.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accNavigate

###

### Warning - UiaElementDoesNotParentToRoot

#### Element's parent chain does not go to the Root Element

This error indicates that the navigation from the given element to the UI tree root is broken.

Note: This issue may cause unpredictable results for an application that tries to navigate the UI tree.

Possible causes for this error:

1. Incorrect implementation of the UI tree parent child hierarchy.

Related Resources

IUIAutomationTreeWalker Interface

### Warning - TooManyChildren

#### Stopped looking for additional siblings after finding {0} siblings. Possible incorrect tree

This warning indicates that the element tree might be cyclic and the tree depth infinite.

Note: This is a navigation issue for automated tools because they will enter what appears to be a circular reference or infinite loop.

Possible causes for this error:

1. Application or control design may be too complex.

Note: This error may be reported for ListView controls with a large number of items and can likely be ignored in these cases.

2. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accNavigate

##

## Tree – Check ParentChild

### Error - ElementIsNotChildOfElementsParent

#### Element is not a child of it's parent

This error indicates that when get_accParent is called on the child element returned by accNavigate (using either the NAVDIR_FIRSTCHILD or NAVDIR_LASTCHILD navigation constants) the parent element returned does not match the parent element specified in the accNavigate call.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accNavigate

IAccessible::get_accParent

###

### Error - ElementsChildHasDifferentParent

#### Element's child({0}) has different parent({1}) than element

This error indicates that, when get_accParent is called on the children of the target element, the children do not report a consistent parent.

Figure 8: An example of the children of one element reporting an inconsistent parent.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

AccessibleChildren

###

### Error - NullParent

#### Elements parent is NULL

This error indicates that NULL is returned when get_accParent is called on the element. The get_accParent method should only return NULL when called on the root element of the verification target.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accNavigate

IAccessible::get_accParent

###

### Error - ElementIsChildOfParentMulipleTimes

#### Element's accParent is ({0}), but original element is a child {1} times

This error indicates that, when get_accParent is called on the target element, it reports being a child of the same parent multiple times.

Note: This is a navigation issue for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::get_accParent

###

### Error - FirstChildLastChildMismatch

#### When navigating by calling {0} from the tested node, and then repeatedly calling {1}, we finished at the following child: {2}. This did not match the result of calling {3} on the tested node, which yielded: {4}. Instead, the child should report as its parent the testing node.

This error indicates that there is a problem when navigating between element’s children.

Note: This navigation issue may cause problems for automated tools because traversing elements might be erratic and unpredictable.

Possible causes for this error:

1. An incorrect or invalid UI Automation implementation.

Related Resources

IUIAutomationElement::GetCachedParent Method

IUIAutomationTreeWalker Interface

### Warning - MethodReturnedUnexpectedHResult

#### {0} returned {1}, but expected return value should have been {2}

This warning indicates that an unexpected HRESULT was returned when attempting to retrieve all children of the element.

Possible causes for this warning:

1. An incorrect or invalid Active Accessibility implementation.

Related Resources

IAccessible::accChild

##

## Tree – HitTesting

### Error - AccessibleObjectFromPointReturnedNullIAccessible, ElementFromPointReturnedNull

#### AccessibleObjectFromPoint/IUIAutomation.ElementFromPoint({0}, {1}) returned null

This error specifies that the address of the object's IAccessible interface/AutomationElement object obtained for the given coordinates is NULL.

Possible causes for this error:

1. User interaction during verification, such as moving focus to a non-target HWND, interfered with the verification process.

2. An incorrect or invalid Active Accessibility implementation.

Related Resources

Navigation Through Hit Testing and Screen Location

AccessibleObjectFromPoint

AutomationElement.FromPoint Method

IUIAutomation::ElementFromPoint Method

###

### Error - AccessibleObjectFromPointReturnedNullChildId

#### AccessibleObjectFromPoint({0}, {1}) returned a null ChildId

This error specifies that the ChildId of the object's IAccessible interface obtained for the given coordinates is NULL.

Possible causes for this error:

1. User interaction during verification, such as moving focus to a non-target HWND, interfered with the verification process.

Related Resources

Navigation Through Hit Testing and Screen Location

AccessibleObjectFromPoint

### Error - ElementIsOrphaned, UiaElementIsOrphaned

#### Element is an orphaned IAccessible/AutomationElement in the tree

This error specifies that the address of the object's IAccessible interface/AutomationElement object obtained for the given coordinates is a reference to an orphaned element in the element tree.

Note: This is an issue for people who rely on a screen-reader and keyboard for navigation because elements will be treated as invisible and will not be announced to the user.

Possible causes for this error:

1. User interaction during verification, such as moving focus to a non-target HWND, interfered with the verification process.

2. An incorrect or invalid Active Accessibility or UI Automation implementation.

Related Resources

Navigation Through Hit Testing and Screen Location

AccessibleObjectFromPoint

AutomationElement.FromPoint Method

IUIAutomation::ElementFromPoint Method

### Warning - AccessibleObjectFromPointReturnedNot_S_OK

#### AccessibleObjectFromPoint({0}, {1}) returned {2} and expected S_OK

This warning indicates that AccessibleObjectFromPoint did not return S_OK as expected for the given coordinates.

Possible causes for this error:

1. User interaction during verification, such as moving focus to a non-target HWND, interfered with the verification process.

2. An incorrect or invalid Active Accessibility implementation.

Related Resources

Navigation Through Hit Testing and Screen Location

AccessibleObjectFromPoint

## Miscellaneous Errors

### Warning - GatheringElement

#### This element has been gathered

This message is not a warning or error and does not require any action. It is stating that the element’s information has been gathered and stored in the log file.

###

### Error - DuplicateSiblingNames

#### Duplicate sibling Name+Role \"{0}\" will cause ambiguity between elements.

This error indicates that an element has the same Name and Role/ControlType as another element.

Note: This may cause confusion because screen readers will read the same text for all the elements with the same Name and Role/ControlType.

Possible causes for this error:

1. Element’s name contain Role/ControlType text.

2. Element’s name or the name of its parent is not set or is set incorrectly.

Related Resources

IAccessible::get_accName
Name Property

UIA_NamePropertyId identifier

AutomationElement.NameProperty

###

### Error - DuplicateSiblingIDs

#### Duplicate Automation ID \"{0}\" will cause ambiguity between elements.

This error indicates that an element has the same Automation ID as another element.

Note: This can cause automation problems that prevent test code from referencing the correct element.

Possible causes for this error:

1. Sibling elements have the same Automation ID

2. Incorrect implementation of the UIAutomationID property.

Related Resources

AutomationIdPropertyId identifier

AutomationIdProperty

### Error - UnexpectedTestError

#### Exception :({0})

This error specifies that an exception unrelated to the verifications has been raised by AccChecker.

To report issues such as this, see the AccChecker 'About' dialog for contact information.

### Error - MemberNotImplememented

#### The method is not implemented on this particular element.

This error specifies that an unexpected method failure has occurred.

### Error – MethodExceptionOccured

#### Exception occured \"{0}\"

This error specifies that an unexpected exception or HRESULT was incountered. There are some exceptions/HRESULTS that are valid. In this case, the results are not expected. This should be fixed.