axe-windows: [BUG] Improve Message: "A split button must not support both the Invoke and Toggle patterns"

Please check whether the bug has already been filed.

Describe the bug

For a win32 split button (child of win32 toolbar), if it supports IExpandCollapseProvider, but neither IToggleProvider, nor IInvokeProvider, SplitButtonInvokeAndTogglePatterns rule shows the following error. A split button must not support both the Invoke and Toggle patterns.

The bug is in SplitButtonInvokeAndTogglePatterns::PassesTest. The following condition has to be satisfied for the test to pass. var condition = (Patterns.Invoke | Patterns.Toggle) & ~(Patterns.Invoke & Patterns.Toggle);

Now if a split button does not support both Invoke, and Toggle patterns, the part before & operator results in false, making the whole test return false.

Either this or the error message is wrong. If it is not okay for such controls to support neither of the two patterns, the message should state it. Reading the message lead me believe that my control is supporting both Toggle, and Invoke patterns.

To Reproduce

  1. Create a sample win32 toolbar which has a split button control.
  2. The provider for the split button control should support ExpandCollapse pattern, but neither of Toggle, and Invoke patterns.
  3. Run accessibility insights on it, and see the error.

Accessibility insights error

Expected behavior

When both Toggle, and Invoke patterns are not handled, the test for SplitButtonInvokeAndTogglePatterns should pass.

Actual behavior

When both Toggle, and Invoke patterns are not handled, the test for SplitButtonInvokeAndTogglePatterns fails, as of now.

Screenshots or .GIF

The following image shows that while the control supports, ExpandCollapse pattern, it does not support Toggle, and Invoke patterns. The condition however is set in such a way that it causes the test to fail.

image

Desktop (please complete the following information):

  • OS: Windows 10 20H2 19042.1348
  • Accessibility Insights for Windows Version: 1.1.1741.1
  • Target Application:
  • Target Application Version:

Additional context

Priority requested -

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

@chingucoding, please feel free to take a stab at rewording the text. You’ll also need to take a look at the HowToFix description. These are intentionally short because there’s a cap on the maximum length of a bug sent to ADO. Please try to keep this in mind when wordsmithing.