ListItem Control Type

This topic provides information about Microsoft UI Automation support for the ListItem control type.

List item controls are an example of controls that implement the ListItem control type.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the ListItem control type. The UI Automation requirements apply to all list item controls where the UI framework/platform integrates UI Automation support for control types and control patterns.

This topic contains the following sections.

Typical Tree Structure

The following table depicts a typical control and content view of the UI Automation tree that pertains to list item controls and describes what can be contained in each view. For more information about the UI Automation tree, see UI Automation Tree Overview.

Control View Content View
  • ListItem
    • Image (0 or more)
    • Text (0 or more)
    • Edit (0 or more)
  • ListItem

 

The children of a list item control within the content view of the UI Automation tree must always show zero children. If the structure of the control is such that other items are contained underneath the list item then it should follow the requirements for the UI Automation support for the TreeItem control type.

Relevant Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the ListItem control type. For more information about UI Automation properties, see Retrieving Properties from UI Automation Elements.

UI Automation Property Value Notes
UIA_AutomationIdPropertyId See notes. The value of this property must be unique among all peer elements in the raw view of the UI Automation tree. Allocate the AutomationId property for a list item if the element is known to be consistent across different instances of the user interface. If the list item is dynamically populated and not predictable, leave the AutomationId property blank.
UIA_BoundingRectanglePropertyId See notes. This value of this property should include the area of the image and text contents of the list item.
UIA_ClickablePointPropertyId Depends If the list control has a clickable point (a point that can be clicked to cause the list to take focus), that point must be exposed through this property. If the list control is completely covered by descendant list items, it will return the UIA_E_NOCLICKABLEPOINT error to indicate that the client must ask an item inside the list control for a clickable point.
UIA_ControlTypePropertyId ListItem This value is the same for all UI frameworks.
UIA_HelpTextPropertyId See notes. The Help text for list controls should explain why the user is being asked to make a choice from a list of options, which is typically the same type of information presented through a tooltip. For example, "Select an item to set the display resolution for your monitor".
UIA_IsContentElementPropertyId TRUE The list control is always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyId TRUE The list control is always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyId See notes. If the container can accept keyboard input then this property value should be TRUE.
UIA_IsOffscreenPropertyId Depends This property must return a value for whether the list item is currently scrolled into view within the parent container that implements Scroll control pattern.
UIA_ItemStatusPropertyId Depends If the control contains status that is being updated dynamically, this property must be supported so that an assistive technology can receive updates when the status of the element changes.
UIA_ItemTypePropertyId Depends This property should be exposed for list item controls that are representing an underlying object. These list item controls typically have an icon associated with the control that users associate with the underlying object.
UIA_LabeledByPropertyId See notes. If there is a static text label then this property must expose a reference to that control.
UIA_LocalizedControlTypePropertyId See notes. Localized string corresponding to the ListItem control type. The default value is "list item" for en-US or English (United States).
UIA_NamePropertyId See notes. The value of a list item control's name property comes from the text label of the item.

 

Required Control Patterns

The following table lists the UI Automation control patterns required to be supported by all list item controls. For more information on control patterns, see UI Automation Control Patterns Overview.

Control Pattern Support Notes
IExpandCollapseProvider Depends If the item can be manipulated to show or hide information, the ExpandCollapse control pattern must be implemented.
IGridItemProvider Depends If item-to-item spatial navigation is supported within the list container, and the container is arranged in rows and columns, the GridItem control pattern must be implemented.
IInvokeProvider Depends If the item has a command that can be performed on it, separate from selection, the Invoke control pattern must be implemented. This is typically an action associated with double-clicking the list item control. Examples would be launching a document from Windows Explorer, or playing a music file in Microsoft Windows Media Player.
IScrollItemProvider Depends If the list item is contained within a container that is scrollable, the ScrollItem control pattern must be implemented.
ISelectionItemProvider Depends A list item control that supports selection must implement the SelectionItem control pattern. This allows list items controls to convey when they are selected.
IToggleProvider Depends If the list item is checkable and the action does not perform a selection state change, the Toggle control pattern must be implemented.
IValueProvider Depends If the item can be edited, the Value control pattern must be implemented. Changes to the list item control will cause changes to the values of the UIA_NamePropertyId and UIA_ValueValuePropertyId properties.

 

Required Events

The following table lists the UI Automation events that list item controls are required to support. For more information on events, see UI Automation Events Overview.

UI Automation Event Notes
UIA_AutomationFocusChangedEventId
UIA_BoundingRectanglePropertyId property-changed event.
UIA_ExpandCollapseExpandCollapseStatePropertyId property-changed event. If the control supports the ExpandCollapse control pattern, it must support this event.
UIA_Invoke_InvokedEventId If the control supports the Invoke control pattern, it must support this event.
UIA_IsEnabledPropertyId property-changed event. If the control supports the IsEnabled property, it must support this event.
UIA_IsOffscreenPropertyId property-changed event. If the control supports the IsOffscreen property, it must support this event.
UIA_ItemStatusPropertyId property-changed event. If the control supports the ItemStatus property, is must support this event.
UIA_NamePropertyId property-changed event.
UIA_SelectionItem_ElementAddedToSelectionEventId If the control supports the SelectionItem control pattern, it must support this event.
UIA_SelectionItem_ElementRemovedFromSelectionEventId If the control supports the SelectionItem control pattern, it must support this event.
UIA_SelectionItem_ElementSelectedEventId If the control supports the SelectionItem control pattern, it must support this event.
UIA_StructureChangedEventId
UIA_ToggleToggleStatePropertyId property-changed event. If the control supports the Toggle control pattern, it must support this event.
UIA_ValueValuePropertyId property-changed event. If the control supports the Value control pattern, it must support this event.

 

Remarks

If a container hosts list items, the primary means of navigation should go to the list items. Placing the focus on subelements through list navigation can be confusing to users and accessibility tools. If the container hosts a vertical list of items, pressing the UP ARROW and DOWN ARROW keys should navigate through the items, but pressing the RIGHT ARROW and LEFT ARROW keys may navigate to subelements of the focused item, such as list columns or UI subelements.

Conceptual

UI Automation Control Types Overview

UI Automation Overview