diff --git a/src/Avalonia.Controls/Automation/Peers/TextBlockAutomationPeer.cs b/src/Avalonia.Controls/Automation/Peers/TextBlockAutomationPeer.cs index 8a89e38f62..bc550b6937 100644 --- a/src/Avalonia.Controls/Automation/Peers/TextBlockAutomationPeer.cs +++ b/src/Avalonia.Controls/Automation/Peers/TextBlockAutomationPeer.cs @@ -16,7 +16,7 @@ namespace Avalonia.Automation.Peers return AutomationControlType.Text; } - protected override string? GetNameCore() => Owner.Text; + protected override string? GetNameCore() => Owner.Inlines?.Text ?? Owner.Text; protected override bool IsControlElementCore() {