Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contents
Overview
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
Properties Check State
Error - VariantNotInt
Error - InconsistentState
Warning - ElementShouldBeOffScreen
Properties Check Name
Error - ElementHasNoName
Error - AccNameLengthTooLong
Error - AccNameContainsInvalidString
Warning - AccNameShouldNotContainRole
Properties CheckAccessKeys
Error - DuplicateAccessKey
Properties CheckBoundingRect
Error - BoundingRectIsIncorrect
Warning - BoundingRectNotHitTestable
Tree Check Navigate
Error - AccNavigate_ReturnedElementWithIncorrectParent
Error - NullParent
Error - IncorrectRoundTrip
Warning - TooManyChildren
Tree Check ParentChild
Error - ElementIsNotChildOfElementsParent
Error - ElementsChildHasDifferentParent
Error - ElementIsChildOfParentMulipleTimes
Warning - MethodReturnedUnexpectedHResult
Tree HitTesting
Error - AccessibleObjectFromPointReturnedNullIAccessible
Error - AccessibleObjectFromPointReturnedNullChildId
Error - ElementIsOrphaned
Warning - AccessibleObjectFromPointReturnedNot_S_OK
Miscellaneous Errors
Error - UnexpectedTestError
Error - MemberNotImplememented
Overview
The UI Accessibility Checker (AccChecker) tool verifies that key accessibility
requirements are met in the design and implementation of Microsoft Active
Accessibility (Active Accessibility) in a control or application user interface (UI),
regardless of the underlying UI framework.
Architecture
The AccChecker architecture incorporates three levels, or stages, of functionality:
1.
2.
3.
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 (or when the list is refreshed
using the associated refresh button).
2.
3.
Figure 3: The AccChecker Results tab with the "Suppress" context item highlighted.
<EventID>ElementHasNoName</EventID>
<Text>Element has no name</Text>
<ParentChain>Windows Firewall.Windows Firewall</ParentChain>
<VerificationRoutine>VerificationRoutines.CheckPropertyName</VerificationRoutine>
<Classname>ATL:BUTTON</Classname>
<AccName />
<AccRole>PushButton</AccRole>
</LogEvent>
</ArrayOfLogEvent>
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, which 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.
File Menu
Open DLL
Run the verification routines as specified for the chosen verification target.
Enable All/ Disable All
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.
System;
System.Collections.Generic;
System.Linq;
System.Text;
AccCheck.Logging;
Command-line Example
The following snippet demonstrates how to test the accessibility of Notepad using
unmanaged code and the AccChecker console application.
void MyTests::AccessibilityOfNotepad()
{
BSTR accCheckerApp = "AccCheckConsole";
BSTR accCheckerParams = "-hwnd ";
// obtain a pointer to notepad's main window
HWND pNotepad = GetNotepadPtr();
// append the hWnd to our arguments list
notepadParams += pNotepad;
HINSTANCE nResult =
ShellExecute(NULL,_T("runas"),accCheckerApp,accCheckerParams, NULL, SW_HIDE);
if((int)nResult == 0)
{
cout << "Success!!";
Log(L"Accessibility of notepad passed");
}
else
{
Log(L"Tests failed!");
}
}
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.
2.
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.
2.
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 SHIFTTAB), 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 since 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.
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 SHIFTTAB), 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 since traversing elements appears erratic and unpredictable.
Possible causes for this error:
1.
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.
2.
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 since traversing elements might be erratic and unpredictable.
Related Resources
Guidelines for Keyboard User Interface Design
Windows Vista User Experience 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[tabIn
dex].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 since the tab order appears
circular.
Related Resources
Guidelines for Keyboard User Interface Design
Windows Vista User Experience 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 since traversing elements will seem to take a long time and may appear
cyclic.
Possible causes for this warning:
1.
2.
Related Resources
Guidelines for Keyboard User Interface Design
Windows Vista User Experience 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 Vista User Experience Guidelines - Keyboard
1.
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 since elements may be incorrectly identified to the user.
Possible causes for this error:
1.
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 since an element that has an intrinsic value must be able to report that
value to a user.
Possible causes for this error:
1.
Related Resources
IAccessible::get_accRole
Object Roles
Related Resources
IAccessible::get_accState
Error - InconsistentState
A control has states that are inconsistent {0} and {1}
This error indicates that an element is reporting inconsistent or conflicting Active
Accessibility states. For example, when the get_accState method returns any of the
following combinations:
Note: This is an issue for people who rely on a screen-reader and keyboard for
navigation since an incorrect element state may be reported to the user.
Possible causes for this error:
1.
Related Resources
IAccessible::get_accState
Object State Constants
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
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.
Related Resources
IAccessible::get_accName
Name Property
Error - AccNameLengthTooLong
Element's accName 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 since an element may have an unpronounceable, non-intuitive name.
Possible causes for this error:
1.
Related Resources
IAccessible::get_accName
Name Property
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 since an element may have an unpronounceable, non-intuitive name.
Possible causes for this error:
1.
Related Resources
IAccessible::get_accName
Name Property
Warning - AccNameShouldNotContainRole
accName ({0}) should not contain the text of the Role ({1})
This error indicates that the name of an element incorporates its Active
Accessibility role. For example, the get_accName method used to retrieve the
Active Accessibility name of an element returns
ROLE_SYSTEM_SCROLLBAR_*.
Note: This is an issue for people who rely on a screen-reader and keyboard for
navigation since an element may have an unpronounceable, non-intuitive name.
Possible causes for this error:
1.
2.
Related Resources
IAccessible::get_accName
Name Property
Properties CheckAccessKeys
Error - DuplicateAccessKey
Element has a duplicate AccessKey ({0})
This error specifies that the access 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 since
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
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.
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
Note: This is a navigation issue for automated tools since traversing elements
might be erratic and unpredictable.
Possible causes for this error:
1.
Related Resources
IAccessible::accNavigate
IAccessible::get_accParent
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 since traversing elements
might be erratic and unpredictable.
Possible causes for this error:
1.
Related Resources
IAccessible::accNavigate
IAccessible::get_accParent
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.
Note: This is a navigation issue for automated tools since traversing elements
might be erratic and unpredictable.
Related Resources
IAccessible::accNavigate
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 since they will enter what
appears to be a circular reference or infinite loop.
Possible causes for this error:
1.
2.
Related Resources
IAccessible::accNavigate
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.
Note: This is a navigation issue for automated tools since traversing elements
might be erratic and unpredictable.
Possible causes for this error:
1.
Related Resources
AccessibleChildren
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 since traversing elements
might be erratic and unpredictable.
Possible causes for this error:
1.
Related Resources
IAccessible::get_accParent
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.
Note: If this error is reported, please contact the AccChecker Team alias with the
details of the error.
Possible causes for this warning:
1.
Related Resources
IAccessible::accChild
Tree HitTesting
Error - AccessibleObjectFromPointReturnedNullIAccessible
AccessibleObjectFromPoint({0}, {1}) returned a null IAccessible
This error specifies that the address of the object's IAccessible interface obtained for
the given coordinates is NULL.
Possible causes for this error:
1.
2.
Related Resources
Navigation Through Hit Testing and Screen Location
AccessibleObjectFromPoint
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.
Related Resources
Navigation Through Hit Testing and Screen Location
AccessibleObjectFromPoint
Error - ElementIsOrphaned
Element is an orphaned IAccessible in the tree
This error specifies that the address of the object's IAccessible interface 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 since elements will be treated as invisible and will not be announced to
the user.
Possible causes for this error:
1.
2.
Related Resources
Navigation Through Hit Testing and Screen Location
AccessibleObjectFromPoint
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.
2.
Related Resources
Navigation Through Hit Testing and Screen Location
AccessibleObjectFromPoint
Miscellaneous Errors
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.
Please send an E-mail to the AccCheck alias or log a bug in the "Windows 7" Product
Studio database under "\WEX-Windows Experience\User Interface
Platform\AAA\Accessibility FCE".