Add focus rectangle to PrintPreviewControl#9477
Conversation
|
Test failure is in the PrintPreview control - Stack trace |
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Please send this to testing and review the change history for the change that hid the TabStop to see if we had updated the docs . If we did, then please prepare a docs issue to roll this back.
src/System.Windows.Forms/src/System/Windows/Forms/Printing/PrintPreviewControl.cs
Outdated
Show resolved
Hide resolved
|
Would it make sense to add new unit tests for the new accessible object? |
8c78a55 to
5fd1590
Compare
|
Tests are still failing - Stack trace |
src/System.Windows.Forms/src/System/Windows/Forms/Printing/PrintPreviewControl.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Printing/PrintPreviewControl.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Printing/PrintPreviewControl.cs
Outdated
Show resolved
Hide resolved
...ws.Forms/src/System/Windows/Forms/PrintPreviewControl.PrintPreviewControlAccessibleObject.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Printing/PrintPreviewControl.cs
Outdated
Show resolved
Hide resolved
- replace native scrollbars with HScrollBar and VScrollBar controls; - draw focus rectangle - modify UIA tree to include new scrollbars.
…efault value is left 'false'.
- renamed fields to start with underscore; - reordered class members to improve readability; - refactored size calculation methods to avoid unnecessary casts.
823aafd to
1328a94
Compare
- moved PrintPreviewControlAccessibleObject file to Printing folder; - reverted adding SR resource strings; - added FragmentNavigate method for PrintPreviewControlAccessibleObject; - added custom AccessibleObject classes for scrollbars, to maintain UIA tree integrity; - added unit tests.
1328a94 to
c5d84eb
Compare
|
This fixes bug discovered in an accessibility test pass, it should be shipped in NET8 per the SLA, thus moving it into the NET8 milestone. Risk is in incomplete implementation of the accessibility features, and should not affect the runtime functionality of the control |
ed8eeaa to
a7550e0
Compare
Fixes #9275
Proposed changes
VScrollBarandHScrollBarcontrols. Native scrolling did not allow drawing focus rectangle that would include scrollbars.PrintPreviewControlhas focus.PrintPreviewControl.TabStopproperty from Designer (see PR Hiding TabStop property of PrintPreviewControl from Designer and setting the default value as false. #7529). Default value is leftfalseto avoid breaking existing code.PrintPreviewControlAccessibleObjectclass to include new scrollbars.Customer Impact
Tabkey.Regression?
Risk
Screenshots
Before
Focus rectangle is not visible:
before.mp4
After
Focus is visible:
after.mp4
This is how Focus rectangle looks in High Contrast themes:

Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow