winforms icon indicating copy to clipboard operation
winforms copied to clipboard

When we hit ENTER key to check/uncheck the checkbox present under 'ToolstripMenuItem1' dropdown is getting closed and keyboard focus loss is observed: A11y_.NET CoreWinforms_StripControls_Toolstripwithmenuitem_Keyboard

Open PoojaNamde opened this issue 1 year ago • 6 comments

.NET version

dotnet-sdk-9.0.100-preview.5.24258.1

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No response

Issue description

GitHub Tags:

#A11yMAS; #A11yTCS; #A11ySev2; #BM_.NET Core[Winforms]_Win32_May2024; #.NETCore; #WCAG2.4.3; #DesktopApp; #Win11; #FTP; #Keyboard;

Environment Details:

App name: .NET Core Winforms Window Version: Win 11 OS Build: 22621.3085

Repro Steps:

  1. Launch the "Accessibility core app".
  2. Main Form screen would appear.
  3. TAB to "MenuToolbars_Controls:Testing the controls under Menu Toolbars Tab" and hit ENTER key.
  4. TAB to StripControls button and hit ENTER key.
  5. TAB to Toolstripwithmenuitem1 and hit ENTER key.
  6. Try to check/ uncheck the checkbox using ENTER key and observe the issue.

Actual Result:

When we hit ENTER key to check/uncheck the checkbox present under 'ToolstripMenuItem1' dropdown is getting closed and keyboard focus loss is observed.

Expected Result:

When we hit ENTER key to check/uncheck the checkbox present under 'ToolstripMenuItem1' dropdown should not get closed and keyboard focus should remain on the checkbox.

User Impact:

Keyboard users will face difficulty while interacting with the control as its getting closed and focus is moving to other controls.

Attachment

https://github.com/dotnet/winforms/assets/90901519/2ed613c4-ecf8-4f9b-a331-e4b3c5c7d23c

PoojaNamde avatar May 29 '24 16:05 PoojaNamde

GithubTags:#Rev:yaja;

Yash14j avatar May 31 '24 08:05 Yash14j

For DropDownMenu, menu items close the menu by default when clicked and focus moves between controls within the application. This is a common issue in VS and windows application.

MelonWang1 avatar Jun 03 '24 06:06 MelonWang1

@MelonWang1 can you check to see if spacebar works in this case? I think it should. In which case I don't think this bug is valid.

merriemcgaw avatar Jun 04 '24 23:06 merriemcgaw

@merriemcgaw In the MenuStrip control, the space bar does not work. In the ToolStrip control, the space bar works. See the video.

https://github.com/dotnet/winforms/assets/94418985/13e6f131-32b9-4f16-9ac6-c733b17c78ae

MelonWang1 avatar Jun 05 '24 01:06 MelonWang1

@Tanya-Solyanik this seems like something that may be worth changing - checked MenuItems maybe should respond to the spacebar key to check/uncheck the menu and enter executes it and closes the menu.

Visual Studio does have this behavior in the Window menu, but it feels off to me (show tabs in Sidebar or something like that). We could take this one to Office Hours.

merriemcgaw avatar Jun 07 '24 00:06 merriemcgaw

@SimonZhao888 - I spoke with the SMEs and they love the idea of the space bar working to check and uncheck the menu without making the MenuStrip lose focus. Also, please make sure there is a visible focus indicator on the form after the user hits enter to check it (and close the MenuStrip).

merriemcgaw avatar Jun 13 '24 21:06 merriemcgaw

@SimonZhao888 Verified this issue in the latest env, issue still repro. Could you please reactivate this bug or provide the latest env details to reverify this issue. Please find repro attachment for reference.

11449_repro.zip

PoojaNamde avatar Jul 16 '24 08:07 PoojaNamde

@PoojaNamde Could you please download latest .NET 9.0 SDK 9.0.100-preview.7.24366.32 from https://github.com/dotnet/sdk/blob/main/documentation/package-table.md to verify? The toolStripMenuItem not support click to checked when set CheckOnClick property to false. Untitled

MelonWang1 avatar Jul 17 '24 02:07 MelonWang1

Verified this issue in the latest .NET 9.0 Preview7 SDK build: 9.0.100-preview.7.24367.22, it was fixed: Pressing Space can change check/uncheck state; pressing Enter can change check/uncheck state and close dropdown with keeping focus.

https://github.com/user-attachments/assets/2f26f04c-f69b-4d14-af21-bbf1d1a8be3f

Olina-Zhang avatar Jul 18 '24 06:07 Olina-Zhang

Verified the issue with .NET 9.0.100-preview7.24402.8 test pass build that the issue has been fixed, which have the same results as above.

Liv-Goh avatar Aug 05 '24 06:08 Liv-Goh

@Liv-Goh Could you pls share .NET 9.0.100-preview7.24402.8 and latest winform zip file to verify this issue.

PoojaNamde avatar Aug 08 '24 06:08 PoojaNamde

@PoojaNamde upload in here.

MelonWang1 avatar Aug 08 '24 06:08 MelonWang1

@MelonWang1 verified this issue in the latest environment provided above. Issue is still able to reproduce. Please find the repro attachment for reference. Please reactivate the bug as it is not fixed.

https://github.com/user-attachments/assets/5a794da6-90d7-4c2c-a3f5-b6f3db158ae1

PoojaNamde avatar Aug 13 '24 10:08 PoojaNamde

@PoojaNamde Use the latest environment provided above to verified, the issue was fixed. Please see below video.

https://github.com/user-attachments/assets/5489de46-3e7c-4524-910d-31e43330f3c2

MelonWang1 avatar Aug 14 '24 02:08 MelonWang1

Unfortunately, fixing this broke the Menu Selection, and seems to be the showstopper for .NET Paint to migrate to .NET 9 (see #11909), so we need to address this rather urgently.

I will reverse this PR and see if this resolve his issues. If that does the trick, let's tackle this with a different approach for .NET 10. Currently, Visual Studio shows the same behavior, so, I am not terrible concerned to revert this right now.

@merriemcgaw, @Tanya-Solyanik, @lonitra.

KlausLoeffelmann avatar Aug 19 '24 19:08 KlausLoeffelmann

@merriemcgaw - paperwork should be updated unless we have a new fix soon.

Tanya-Solyanik avatar Aug 19 '24 23:08 Tanya-Solyanik

#A11yByDesign; #A11YCAIOH; #CEACCApproved; #Closed; #Regressed:08-30-24;

This is Invalid bug as this is a standard behavior on Windows or of menu item checks checkboxes. one Focus loss is observed in sample app and that needs to be fixed in primary application Author.

PoojaNamde avatar Aug 30 '24 10:08 PoojaNamde