dotnet / winforms

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

[A11Y] Property Editor drop down value pickers are sometimes hard to use with keyboard and screen reader #12182

Open towebo opened 1 month ago

towebo commented 1 month ago

Environment

VisualStudio.17.Preview/17.11.0-pre.5.0+35118.90

.NET version

8.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

No

Issue description

If you use the keyboard to edit property values in the Property Editor and you need to select a predefined value from a drop down you sometimes get an error message.

Steps to reproduce

  1. Start a screen reader such as Narrator, NVDA or JAWS.
  2. Start Visual Studio and create a new WinForms application.
  3. Open the form and add a DataGridView to it.
  4. Press Esc to get rid of the task window.
  5. Press F4 to go to the Property Editor.
  6. Navigate to the ColumnHeadersHeightSizeModethe behavior for adjusting the column headers height. nivå 1 property.
  7. Use Alt + Down arrow to open the drop down list to choose a property value.
  8. Use the up and down arrows to move between the different values in the list.
  9. You can also try to press F4 instead of Alt + Down arrow to open the editor for the particular property type.

Diagnostics

No response

Tanya-Solyanik commented 1 month ago

@Olina-Zhang - could you please investigate if this is dependent on the screen reader? And if it reproduces with the mouse.

Nora-Zhou01 commented 1 month ago

When the ColumnHeadersHeightSizeMode property is selected using the keyboard, narrator does not display the currently selected property, as shown below: 1

https://github.com/user-attachments/assets/31ff6ff1-17b2-4fa2-bcd0-8eb88c991756

When selected with the mouse narrator displays the wrong current property, as shown below: 2

https://github.com/user-attachments/assets/3921c1f0-48c1-4a36-a2cf-2546f4aab076

merriemcgaw commented 3 weeks ago

This is absolutely something we are looking into both for the .NET 10 runtime experience and the Visual Studio design time experience. The VS stuff runs on .NET Framework, so there are limitations potentially to what we can do.

towebo commented 3 weeks ago

Oh, .NET Framework? Whell, then it's just a matter of fixing things and release .NET Framework 4.8.2... Even if it would be preferable to fix a11y in .NET Framework this case must be so rare that you can count them on your team's fingers.

One workaround could be to detect if a screen reader is running and change behavior for the drop down property editor when pressing F4 so it shows a dialog containing a listbox with the property values, an OK and a Cancel button. I understand that you'd rather fix the underlying problem but I'm all for workarounds when you'll never get ROI. The most important is to get the job done so the compiled aplication looks and feels as expected. You can revisit this when VS runs on the latest .NET where you've fixed the a11y bugs.