From f703d3873d7ba2a289e5593fb167405ca8f11de3 Mon Sep 17 00:00:00 2001 From: Melissa Date: Thu, 8 Jan 2026 18:38:35 +0100 Subject: [PATCH] Fixed accessibility with screen reader on TextBlock controls with inlines rather than pure text (#20438) --- .../Automation/Peers/TextBlockAutomationPeer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {