From bef7b1830347ff611cdf15e55596303acd07ca44 Mon Sep 17 00:00:00 2001 From: "Aleksandar Marinov (INFRAGISTICS INC)" Date: Thu, 25 Jun 2026 23:29:35 +0300 Subject: [PATCH] Fix null Name on empty page header description (MAS 4.1.2) The PageHeader description Label is a focusable tab stop, but its visibility used NullToVisibilityConverter, which only collapses on null - not on an empty string. Pages whose description is "" (Label, TextBox, TextBlock, RichTextEdit, PasswordBox and many others) therefore rendered an empty, focusable element with a null UI Automation Name, flagged by Accessibility Insights as "The Name property of a focusable element must not be null" (MAS 4.1.2 - Name, Role, Value). - Switch the description Label visibility to EmptyToVisibilityConverter so it collapses on null, empty, or whitespace, removing the empty focusable element entirely. - Add AutomationProperties.Name bound to Description so the description has a meaningful Name when it is visible. - Remove the now-unused NullToVisibilityConverter resource declaration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Sample Applications/WPFGallery/Controls/PageHeader.xaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sample Applications/WPFGallery/Controls/PageHeader.xaml b/Sample Applications/WPFGallery/Controls/PageHeader.xaml index f291d8bfd..62d27e332 100644 --- a/Sample Applications/WPFGallery/Controls/PageHeader.xaml +++ b/Sample Applications/WPFGallery/Controls/PageHeader.xaml @@ -4,7 +4,7 @@ xmlns:controls="clr-namespace:WPFGallery.Controls" xmlns:helpers="clr-namespace:WPFGallery.Helpers"> - +