Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0][Accessibility] Fix keyboard navigation and screen reader experience in dropdown type editors in property grid #12605

Open
wants to merge 4 commits into
base: release/9.0
Choose a base branch
from

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Dec 9, 2024

Backport of #12508, #12431, #12356 and #12479 to release/9.0
Fixes #12607
NET10 Bugs: #12434, #12421, #12440, #12031

Bug Description

There are four issues that occur when using the up/down keys to switch property values ​​in the property page.

  1. When navigating to "Auto Size" dropdown using the up/down arrow keys, it is getting auto selected without hitting ENTER

  2. After using Tab to switch property values, then using the up/down keys to switch items in the drop-down box expanded by F4 will cause the drop-down box to collapse directly

  3. [Accessibility] When using up/down to toggle property value on edit text box, The Accessibility ​​rectangle focuses on the entire property row instead of the original edit text box

  4. [Accessibility] Narrator cannot announce items correctly when switching the items by using up/down keyboard arrow that without expand the dropdown list panel

Customer Impact

PropertyGrid drop down type editor does not support conventional keyboard navigation. Usually, selection is committed when the ENTER key is pressed. However, in this case value is committed on the Down arrow press. Then the drop down list is expanded, the screen reader user might want to navigate through all values in the drop down using the arrows, on each arrow key press the new item should be presented (and announced) in the selection text box, however, the drop down is closed on the first arrow key. According to the accessibility SMEs, this is a major problem - the keyboard users are losing their work by committing a wrong value. Screen reader user don't get correct feedback when navigating through the drop down list.

Regression?

No, Keyboard navigation had been designed incorrectly from the .NET Framework.
Yes for issue #12421

Testing done

  • manual, using Accessibility insights, Narrator, NVDA.
  • test team ran migrated automation cases

Risk

low.

Microsoft Reviewers: Open in CodeFlow

…xBase.cs (dotnet#12479)

* Add UIA_AutomationFocusChangedEventId in SelectInternal function of  PropertyGridView.GridViewTextBox

* Add a check that when the selected text is (0, 0), let the AI ​​rectangle refocus the current text box

* Rename the variables of function SelectInternal
…UpAndDown (dotnet#12508)

* Unhook the mouse down hook at the end of PropertyGridView.ProcessEnumUpAndDown

* Removing ? from code line "EditTextBox?.SelectAll();"
…switch property values ​​on edit textBox (dotnet#12431)

* Fix editor text box focus issue when switching value property grid view

* Override function SelectInternal in file PropertyGridView.GridViewTextBox.cs

* Removing fullRefresh condition from function Refresh
@LeafShi1 LeafShi1 requested a review from a team as a code owner December 9, 2024 10:40
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.82951%. Comparing base (7a4fa49) to head (63ded57).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/9.0      #12605         +/-   ##
=====================================================
- Coverage     74.83047%   74.82951%   -0.00097%     
=====================================================
  Files             3022        3022                 
  Lines           630258      630258                 
  Branches         46794       46794                 
=====================================================
- Hits            471625      471619          -6     
+ Misses          155253      155249          -4     
- Partials          3380        3390         +10     
Flag Coverage Δ
Debug 74.82951% <87.50000%> (-0.00097%) ⬇️
integration 18.02416% <81.25000%> (-0.00635%) ⬇️
production 47.85813% <87.50000%> (-0.00211%) ⬇️
test 97.00830% <ø> (ø)
unit 44.88803% <75.00000%> (-0.00458%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@Tanya-Solyanik Tanya-Solyanik changed the title Backport pr 12356 12431 12508 and 12479 [release/9.0][Accessibility] Fix keyboard navigation in dropdown type editors in property grid Dec 9, 2024
@Tanya-Solyanik Tanya-Solyanik changed the title [release/9.0][Accessibility] Fix keyboard navigation in dropdown type editors in property grid [release/9.0][Accessibility] Fix keyboard navigation and screen reader experience in dropdown type editors in property grid Dec 9, 2024
@Tanya-Solyanik Tanya-Solyanik added the 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Dec 9, 2024
@lonitra lonitra added the 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Dec 9, 2024
@lonitra
Copy link
Member

lonitra commented Dec 9, 2024

This will need to wait until February servicing is open for merge.

@LeafShi1
Copy link
Member Author

This has been tested by testing team, it works well with all main accessibility tools.

@LeafShi1 LeafShi1 removed the 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants