From 573776a417a35de58fc0019962dc15318c980f55 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Wed, 21 Aug 2024 09:26:09 -0700 Subject: [PATCH] fix: Exclude the win32 IP address control from the SiblingUniqueAndFocusable rule (#1038) The Win32 IP address control consists of a pane of edit fields, one per octet of an IPV4 address. As such, the `SiblingUniqueAndFocusable` rule is not appropriate for this control. --- src/Rules/Library/SiblingUniqueAndFocusable.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Rules/Library/SiblingUniqueAndFocusable.cs b/src/Rules/Library/SiblingUniqueAndFocusable.cs index 3bbecb8f1..d2569640b 100644 --- a/src/Rules/Library/SiblingUniqueAndFocusable.cs +++ b/src/Rules/Library/SiblingUniqueAndFocusable.cs @@ -63,7 +63,12 @@ protected override Condition CreateCondition() & WPF & NoChild(Custom | Name.NullOrEmpty); - return EligibleChild & NotParent(wpfDataItem); + var ipAddressControl = Win32Framework & ClassName.Is("SysIPAddress32"); + + return EligibleChild + & NotParent(wpfDataItem) + // microsoft/accessibility-insights-windows#1838: The Win32 IP address control yields false positives for this rule. + & NotParent(ipAddressControl); } } // class } // namespace