Back to Uno

AutomationProperties reference

doc/articles/features/accessibility/automation-properties.md

6.6-release-branch-cut4.2 KB
Original Source

AutomationProperties reference

[!TIP] This article covers Uno-specific platform mappings for AutomationProperties. For a full description of each property and usage guidance, see Expose basic accessibility information (Microsoft Learn).

Uno implements the WinUI AutomationProperties and maps each to the platform's native accessibility API. The tables below show how each property is surfaced on each target.

Name

The accessible name is resolved in this order:

  1. Explicit AutomationProperties.Name
  2. AutomationProperties.LabeledBy target's text
  3. The control's plain text content (e.g., Button.Content when it is a string)
  4. Inner text of child elements (Skia targets)
PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation Name property
macOSSkiaNSAccessibility.accessibilityLabel
Web (WASM)Skia / Nativearia-label attribute on the semantic DOM element
AndroidNativeAccessibilityNodeInfo.contentDescription
iOSNativeUIAccessibility.accessibilityLabel

AutomationId

[!NOTE] To avoid performance overhead, AutomationId only has an effect when the IsUiAutomationMappingEnabled MSBuild property is set to true, or when Uno.UI.FrameworkElementHelper.IsUiAutomationMappingEnabled is set in code.

PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation AutomationId property
macOSSkiaNSAccessibility.accessibilityIdentifier
Web (WASM)Skia / Nativexamlautomationid attribute + aria-label on the HTML element
AndroidNativeView.contentDescription
iOSNativeUIAccessibility.accessibilityIdentifier

HelpText

PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation HelpText property
macOSSkiaNSAccessibility.accessibilityHelp
Web (WASM)Skia / Nativearia-description attribute

HeadingLevel

PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation HeadingLevel property
macOSSkiaNSAccessibility heading trait
Web (WASM)SkiaRendered as <h1><h6> semantic HTML elements

LandmarkType

Supported values: None (default), Custom, Form, Main, Navigation, Search.

PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation LandmarkType property
macOSSkiaNSAccessibility landmark
Web (WASM)Skia / NativeARIA landmark roles (role="navigation", role="main", role="search", role="form", role="region")

When using LandmarkType="Custom", provide a human-readable description with LocalizedLandmarkType.

LiveSetting

PlatformRenderingMapping
Windows (Win32)SkiaUIAutomation LiveSetting property
macOSSkiaNSAccessibility notification
Web (WASM)Skia / Nativearia-live="polite" or aria-live="assertive" attribute

AccessibilityView

Controls whether an element appears in the automation tree.

ValueMeaning
ContentVisible in both Content and Control views (default)
ControlVisible in the Control view only
RawHidden from all automation views

Uno-specific tips

  • Always localize AutomationProperties.Name. In XAML use the resource naming convention: MyButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name
  • Avoid Opacity="0" and IsHitTestVisible="False" to hide elements. Use Visibility="Collapsed" instead — screen readers can still focus invisible elements with non-collapsed visibility.
  • Set AppBarButton.Label even when it is not visually displayed — it is used by the screen reader.

See also