Skip to content

Commit

Permalink
fix: Exclude the win32 IP address control from the SiblingUniqueAndFo…
Browse files Browse the repository at this point in the history
…cusable 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.
  • Loading branch information
codeofdusk committed Aug 21, 2024
1 parent 06adb41 commit 573776a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Rules/Library/SiblingUniqueAndFocusable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 573776a

Please sign in to comment.