dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.4k stars 976 forks source link

A11y_WINFORMS_CommonControls2_MonthCalendar_Keyboard : Keyboard focus order is incorrect inside "Common Control 2" section #7337

Closed PoojaNamde closed 2 years ago

PoojaNamde commented 2 years ago

Check out Accessibility Insights! - Identify accessibility bugs before check-in and make bug fixing faster and easier.”

.NET version

.NET Framework Version 4.8.04161 Operating System: Windows 11 Enterprise 21H2

Did it work in .NET Framework?

No

Issue description

GitHubTags:#A11yMAS;#A11yTCS;#.NET Core[WINFORMS]-Win32-June2022;#.NET Core;#A11ySev2;#WCAG2.4.3;#DesktopApp;#Win11;#Benchmark;#Keyboard

Actual:

As soon as the "Common Control 2" dialog gets open keyboard focus is first moving to "Web Browser" controls which is incorrect.

Expected:

As soon as the "Common Control 2" dialog gets open keyboard focus should first move to "Month Calendar" controls and then to others control like "Numericc UpDown, Radio button" like wise keyboard order should be there in the dialog.

User Impact:

Keyboard users will face difficulties while navigating common control 2 dialog.

Steps to reproduce

  1. Open Core testing solution in VS Enterprise 2022 Int Preview.
  2. Right click on cs.proj file and click on Build.
  3. Press enter on the application.
  4. Main Form screen would appear.
  5. Click on "Common_Controls2:Testing the controls under the Common_controls" Tab.
  6. Tab to MonthCalendar Section.
  7. Navigate using Tab key and observe that Keyboard focus order is incorrect inside "Common Control 2" section

Attachment:

7337_A11y_WINFORMS_CommonControls2_MonthCalendar_Keyboard MP4.zip

merriemcgaw commented 2 years ago

@PoojaNamde could you please attach a video explaining what is wrong with the tab order for us? This is not enough information.

PoojaNamde commented 2 years ago

@merriemcgaw

Added attachment describing the bug.

merriemcgaw commented 2 years ago

Thanks @PoojaNamde .

The issue appears to be that since the WebBrowser puts focus onto the first focusable element in the web page it appears to swallow focus and we never get back to the other controls on the form. To me this is expected, and a simple HTML doc should allow the tester to see our focus go in and then back out at the end of the HTML doc.

@Olina-Zhang can you replace the website content with the simple html doc below (you'll need to change the extension I think). With very little content I'm interested in finding out where the focus goes next. Just attach the updated sample and assign back to me. Thanks!

simple.txt

Tanya-Solyanik commented 2 years ago

@merriemcgaw - I agree that the web page steals focus after it loads. I experimented with a simple page - it does not.

@Olina-Zhang - I noticed that dialog in the attached movie looks different from the checked in sources - https://github.com/dotnet/winforms/tree/main/src/System.Windows.Forms/tests/AccessibilityTests. Could you please get the source updated? Specifically, the picturebox is empty in our sources 😃. Here is my experiment with a simple page for your reference: https://github.com/Tanya-Solyanik/winforms/commit/882236debd56f4d9ff9c6db495043743af272112

Amy-Li03 commented 2 years ago

Thank you @merriemcgaw and @Tanya-Solyanik , it works to add a simple html for webBrowser, have updated the app: Accessibility_Core_7.0_App.zip, we will update the Accessibility app in GitHub later. @PoojaNamde please use the new app to do testing.

PoojaNamde commented 2 years ago

Verified this issue in the latest environment. Issue is fixed hence closing the bug.

MandiMan commented 2 years ago

Verified on .NET 7.0.100-preview.7.22370.3 TP build, issue is fixed, screenshot as below: issue7359