UI Automation Support for the Hyperlink Control Type

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

Hyperlink controls create links that enable users to navigate within the same page, or from one page to another.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Hyperlink control type. The UI Automation requirements apply to all hyperlink controls, whether Microsoft Windows Presentation Foundation (WPF), Microsoft Win32, or Windows Forms.

This topic contains the following sections.

Required UI Automation Tree Structure

The following table depicts the control view and the content view of the UI Automation tree that pertains to hyperlink 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
  • Hyperlink
  • Hyperlink

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the hyperlink controls. For more information about UI Automation properties, see UI Automation Properties for Clients.

UI Automation Property Value Notes
UIA_AutomationIdPropertyId See notes. The value of this property must be unique across all controls in an application.
UIA_BoundingRectanglePropertyId See notes. The outermost rectangle that contains the whole control.
UIA_ClickablePointPropertyId See notes. The hyperlink control's clickable point must be a point that launches the hyperlink if clicked with a mouse pointer.
UIA_ControlTypePropertyId Hyperlink This value is the same for all UI frameworks.
UIA_IsContentElementPropertyId TRUE The hyperlink control is always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyId TRUE The hyperlink control is always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyId See notes. If the control can receive keyboard focus, it must support this property.
UIA_LabeledByPropertyId See notes. If there is a static text label, this property must expose a reference to that control.
UIA_LocalizedControlTypePropertyId See notes. Localized string corresponding to the Hyperlink control type. The default value is "hyperlink" for en-US or English (United States).
UIA_NamePropertyId See notes. The hyperlink control's name is the text that is displayed on the screen as underlined.

Required UI Automation Control Patterns

The following table lists the UI Automation control patterns that hyperlink controls are required to support. For more information on control patterns, see UI Automation Control Patterns Overview.

Control Pattern/Pattern Property Support/Value Notes
IInvokeProvider Yes All hyperlink controls must support the Invoke control pattern.
IValueProvider Depends Hyperlink controls should support the Value control pattern when the link contains information that is usable and meaningful to the user.
IValueProvider::Value For example, "http://www..." A URL for an Internet or Intranet address is an example of a hyperlink that contains information that is meaningful to the user. A programmatic link, however, is meaningful only to an application and is not recommended for the Value property.

Required UI Automation Events

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

UI Automation Event Notes
UIA_AutomationFocusChangedEventId None
UIA_BoundingRectanglePropertyId property-changed event. None
UIA_Invoke_InvokedEventId None
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_StructureChangedEventId None

Remarks

The Hyperlink control type should be applied only to an object that, when clicked, causes navigation to occur; it should not be applied to the container of the hyperlink. For example, only the clickable "hot spots" inside an image map should have the Hyperlink control type. The same is true of hyperlinks in a text field or document container. In this case, only the hyperlink text or image should have the Hyperlink control type, not the container.

The Text control pattern is ideal for supporting embedded hyperlinks in text or document elements.

Related Topics

Show: