microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Improve text scale support on TextBox and NavigationView buttons

Open United600 opened this issue 1 year ago • 1 comments

Some TexBlocks with glyphs don't properly ignore the system text 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. https://github.com/microsoft/microsoft-ui-xaml/blob/2a60e27c591846556fa9ec4d8f305afdf0f96dc1/controls/dev/NavigationView/NavigationView_themeresources.xaml#L343

  • 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

United600 avatar May 19 '24 20:05 United600

@microsoft-github-policy-service agree

United600 avatar May 19 '24 20:05 United600

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.

michael-hawker avatar May 07 '25 00:05 michael-hawker

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 avatar May 07 '25 13:05 United600