Skip to content

Improve text scale support on TextBox and NavigationView buttons #9644

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

Closed
wants to merge 3 commits into from

Conversation

United600
Copy link

@United600 United600 commented May 19, 2024

Some TexBlocks with glyphs don't properly ignore the system text scale accessibility setting and, for the NavigationView search button, can scale beyond the control limits. The design guidance.

Description

  • Disable IsTextScaleFactorEnabled on the NavigationViewPaneSearchButtonStyle, ported back from WinUI 3.

    <Setter Property="IsTextScaleFactorEnabled" Value="False" />

  • Disable IsTextScaleFactorEnabled on the RevealButtonstyle for the PasswordBox control.

  • Disable IsTextScaleFactorEnabled on the DeleteButtonStyle for the TextBox/NumberBox/PasswordBox/AutoSuggestBox controls

Motivation and Context

Provide better accessibility text size support.

How Has This Been Tested?

Created a test app WinUI 2 with and without the changes.

Screenshots (if appropriate):

Before (IsTextScaleFactorEnabled="True") After (IsTextScaleFactorEnabled="False")
ClearButtonBefore ClearButton
RevealBefore Reveal

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label May 19, 2024
@United600
Copy link
Author

@microsoft-github-policy-service agree

@michael-hawker michael-hawker self-assigned this Mar 12, 2025
michael-hawker added a commit to michael-hawker/WinUI-Gallery that referenced this pull request Mar 20, 2025
niels9001 pushed a commit to microsoft/WinUI-Gallery that referenced this pull request Mar 20, 2025
<!--- Provide a general summary of your changes in the Title above -->

## Description

Related to microsoft/microsoft-ui-xaml#9644

Current with text scaling:

![image](https://github.com/user-attachments/assets/fe4736b7-f8d0-40cb-b7ee-70875f96bc9a)

With change, it stays the same (like the other buttons do).

<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
@michael-hawker
Copy link
Collaborator

Thanks @United600 for the PR and your contribution, I ported this over to the internal repository that is mirrored here. It is now in the codebase that will be shipping with Windows App SDK 1.8.

@United600
Copy link
Author

Thanks @United600 for the PR and your contribution, I ported this over to the internal repository that is mirrored here. It is now in the codebase that will be shipping with Windows App SDK 1.8.

Thanks. It's unfortunate that it doesn't meet the required threshold (IMHO accessibility should) for updating down-level to WinUI 2 as well.

@United600 United600 deleted the patch-1 branch May 7, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants