microsoft / axe-windows

Automated accessibility testing engine for Windows applications
MIT License
136 stars 62 forks source link

[BUG] WinForms edit controls don't support TextPattern until .NET Framework 4.8.1 #971

Closed DaveTryon closed 1 year ago

DaveTryon commented 1 year ago

Please check whether the bug has already been filed.

Describe the bug

The ControlShouldSupportTextPatternEditWinform rule points to https://learn.microsoft.com/en-us/accessibility-tools-docs/items/winforms/edit_controlshouldsupporttextpattern, which reports that this problem is fixed in the .NET Framework 4.8 and above. Empirical observation demonstrates that this has been fixed in .NET Framework 4.8.1, but not in .NET Framework 4.8.

We should update the docs page to reflect the version and the flags. For convenience, here are the flags--same as before, but added Switch.UseLegacyAccessibilityFeatures.5=false; at the end:

  <runtime>
    <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false;Switch.UseLegacyAccessibilityFeatures.4=false;Switch.UseLegacyAccessibilityFeatures.5=false;" />
  </runtime>

To Reproduce Steps to reproduce the behavior:

  1. Create a new WinForms app using .NET Framework
  2. Target .NET Framework 4.8
  3. Put a TextBox on the page
  4. Run the app
  5. Scan with Accessibility Insights for Windows
  6. Follow the link for the reported framework problem

Expected behavior

Based on our understanding and docs, no error should be reported

Actual behavior

We report a framework error. The docs say that you can fix it in .NET Framework 4.8, when it actually takes .NET Framework 4.8.1.

Screenshots or .GIF

Desktop (please complete the following information):

Additional context

UIA doesn't provide the technical ability for us to know if the WinForms app is targeting .NET or .NET Framework, so our best option is probably to update the document page to say that only .NET is fixed.

Priority requested -

DaveTryon commented 1 year ago

Plan: Check to see if any other rules have this problem, then update the docs to reflect the fact that .NET 4.8.1 is the fixed version.

DaveTryon commented 1 year ago

Docs have been updated as described. Closing the issue.