-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add UIA_AutomationFocusChangedEventId to SelectInternal of the TextBoxBase.cs #12479
Add UIA_AutomationFocusChangedEventId to SelectInternal of the TextBoxBase.cs #12479
Conversation
…ropertyGridView.GridViewTextBox
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12479 +/- ##
===================================================
+ Coverage 75.73242% 75.73942% +0.00699%
===================================================
Files 3153 3157 +4
Lines 635807 636106 +299
Branches 46975 47004 +29
===================================================
+ Hits 481512 481783 +271
+ Misses 150870 150866 -4
- Partials 3425 3457 +32
Flags with carried forward coverage won't be shown. Click here to find out more. |
…ngle refocus the current text box
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/System.Windows.Forms/src/System/Windows/Forms/Controls/TextBox/TextBoxBase.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please port to release/9.0 and send the new PR to test.
…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
…r experience in dropdown type editors in property grid (#12605) 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. When navigating to "Auto Size" dropdown using the up/down arrow keys, it is getting auto selected without hitting ENTER 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 [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 [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.
Fixes #12421
Root Cause:
The highlighted part cannot be read completely because when using the up and down keys to switch options, the AI rectangle does not refocus the current edit text box, but directly switches from the rectangle of the previous option to the current rectangle size, as shown in the figure below
So the idea of repairing it is to focus the AI rectangle to the position (0, 0) first when executing CommitValue, and then focus on the new value
Proposed changes
SelectInternal
of theTextBoxBase
that when the selected text is (0, 0), let the AI rectangle refocus the current text boxCustomer Impact
Regression?
Risk
Screenshots
Before
When switching the items by using up/down keyboard arrow that without expand the dropdown list panel, Narrator can not announced the property item entirety.
![image](https://private-user-images.githubusercontent.com/132890443/386090432-dd08f579-5553-45a4-b02f-07ff81f5c247.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3Mjc2NDMsIm5iZiI6MTczOTcyNzM0MywicGF0aCI6Ii8xMzI4OTA0NDMvMzg2MDkwNDMyLWRkMDhmNTc5LTU1NTMtNDVhNC1iMDJmLTA3ZmY4MWY1YzI0Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQxNzM1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNTMyYTFjNGMzYjU2OWUwZTdkNGQyMTJlZjgxODBmZWI0NGQwYTk4MmVlOWYyZjJlY2U0NGVjNjdlZDhlYjQ4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ek_lbcJU0h5_Y5RBShgrsS1DOTH02gtzMxwJ5PMrOnk)
After
When switching the items by using up/down keyboard arrow that without expand the dropdown list panel, Narrator announced the property item entirety.
![image](https://private-user-images.githubusercontent.com/132890443/386091980-e4f8991f-e109-4261-bc35-e480b7d21fa6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3Mjc2NDMsIm5iZiI6MTczOTcyNzM0MywicGF0aCI6Ii8xMzI4OTA0NDMvMzg2MDkxOTgwLWU0Zjg5OTFmLWUxMDktNDI2MS1iYzM1LWU0ODBiN2QyMWZhNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQxNzM1NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNDRjMGZhMjFkZWQ2ZTJiNjZjZjJlMTA1OWFlM2ZiZmU2ZDkwZjMwYmFhYWRjZjIyYWU2NTU1NjI4Y2U0MDg0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ojE_Ifqcud2VnVUyVKJg7cZV_FaWYfqFxkyK8lqnllg)
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow