Event monitoring in Accessibility Insights for Windows

What is event monitoring?

Event monitoring is a feature in Accessibility Insights for Windows that enables you to easily verify that a UI element in a Windows app:

  • Responds as expected to user input.
  • Generates the expected events.

How to use Inspect

Get ready to inspect

  1. Open Accessibility Insights for Windows.
  2. If you are not already in Live Inspect mode, select Inspect in the main navigation bar.
  3. In the command bar, for What to select, choose Element.
  4. Open the application you want to test (aka the target application).

Select an element

  1. Select the UI element you wish to inspect:

    • Use your mouse to hover over the element.

    or

    • Use your keyboard to set focus on the element, then press Shift+F9 to switch back to Accessibility Insights.

    In the target application, the selected element will be visually highlighted. In Accessibility Insights for Windows, in the Details tab, the element's control type and accessible name will be prominently displayed, followed by its Properties and supported Patterns (if any).

    Target application with focused element visually highlighted element next to Accessibility Insights for Windows displaying the element's UI Automation properties

  2. Pause selection (optional):

    1. When you have selected the element you wish to inspect, select Pause UIA Tree in the command bar.
    2. When you are ready to inspect a different element, select Resume UIA Tree in the command bar.

Verify that the element responds correctly to user input

  1. In the Details tab, in the Patterns section, select Actions for the first pattern.

    A dialog will open, with a tab for each action supported by the pattern. In this example, the pattern (SelectionPattern) has only one action (GetSelection), so the dialog has only one tab.

    SelectionPattern Actions dialog opened.

  2. In each tab:

    1. Make sure that the selected element is in an appropriate state to perform the action.
    2. Where needed, provide an appropriate value for the action.
    3. Run the action.
    4. Verify that the action succeeded.

    The dialog will update if the action succeeds. In this example, the GetSelection action returned the selected UI Element and a list of its properties.

    SelectionPattern Actions dialog after running the GetSelection action.

  3. Repeat steps 1 and 2 for each pattern listed in the Patterns section.

Verify that the element generates expected events

  1. Learn about the required events for the element's control type.

  2. Find the selected element in the UIA Tree, and select More options > Listen to Events.

    A new Events view will open in Accessibility Insights for Windows. The view includes an Events table and two tabs, Details and Configuration. By default, the Events table is empty, and the Configuration tab is open.

    Events view with the Events table empty and the Configuration tab open.

  3. Select the events you wish to record.

    By default, expected events based on the control type are recorded.

    If the type of event you wish to monitor is not listed, you can record any supported UI Automation event type by expanding "My Events" in the tree view and opening the "Edit My Events..." node contained within.

  4. Start recording.

    The Details tab will open automatically, and new events will appear in the Events table.

    Events view with the Details tab open.

  5. Interact with the element using your mouse or keyboard.

  6. Verify that the element generates the required events.

    Events generated by the selected element will be added to the Events table. In this example, selecting an item in the Species list (in the target application) generated a series of focus change events.

    New events recorded in the Events table.