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

fix #12663 [Accessibility][High Contrast] ToolStrip grip icon colour contrast is less than 4.5:1 in Normal Mode and HC Desert mode #12682

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Dec 25, 2024

Fixes #12663

root cause

dot color is not contrasting enough compared to the background color.

Proposed changes

  • Change the color to a more contrasting color compared to the background color.

Regression?

  • No

Risk

  • low

Screenshots

Before

Image

HC Aquatic
Image

HC Desert
Image

HC Dusk
Image

HC Night Sky
Image

After

win11

image

win10

image

Test methodology

  • manual,
Microsoft Reviewers: Open in CodeFlow

…olour contrast is less than 4.5:1 in Normal Mode and HC Desert mode
@Epica3055 Epica3055 requested a review from a team as a code owner December 25, 2024 08:43
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.03546%. Comparing base (58d5c74) to head (174a974).
Report is 35 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12682         +/-   ##
===================================================
+ Coverage   76.03484%   76.03546%   +0.00061%     
===================================================
  Files           3180        3181          +1     
  Lines         639637      639670         +33     
  Branches       47213       47215          +2     
===================================================
+ Hits          486347      486376         +29     
- Misses        149773      149781          +8     
+ Partials        3517        3513          -4     
Flag Coverage Δ
Debug 76.03546% <66.66667%> (+0.00061%) ⬆️
integration 18.17487% <0.00000%> (+0.00967%) ⬆️
production 49.83006% <66.66667%> (+0.00387%) ⬆️
test 97.02915% <ø> (-0.00209%) ⬇️
unit 47.05204% <66.66667%> (+0.00365%) ⬆️

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

@ricardobossan
Copy link
Member

ricardobossan commented Dec 26, 2024

All LGTM!

None

none

Night Sky

Night sky

Aquatic

Aquatic

Desert

desert

Dusk

dusk

Copy link
Member

@LeafShi1 LeafShi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the ToolStripProfessionalRenderer has been changed. Can you confirm whether this problem also exists in other rendering modes?

@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label Dec 27, 2024
@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback The team requires more information from the author 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) and removed waiting-review This item is waiting on review by one or more members of team labels Dec 27, 2024
@Tanya-Solyanik
Copy link
Member

Please get this fix tested on Win10 themes.

@Epica3055
Copy link
Member Author

@LeafShi1

This is the code how the Grip is painted, I don't think we can control the color 🤔

internal unsafe void DrawBackground(HDC dc, Rectangle bounds, HWND hwnd = default)
{
if (bounds.Width < 0 || bounds.Height < 0)
{
return;
}
if (!hwnd.IsNull)
{
using var htheme = OpenThemeData(hwnd, Class);
_lastHResult = PInvoke.DrawThemeBackground(htheme, dc, Part, State, bounds, null);
}
else
{
_lastHResult = PInvoke.DrawThemeBackground(HTHEME, dc, Part, State, bounds, null);
}
}

@dotnet-policy-service dotnet-policy-service bot added untriaged The team needs to look at this issue in the next triage and removed 📭 waiting-author-feedback The team requires more information from the author labels Dec 30, 2024
@Epica3055
Copy link
Member Author

@Tanya-Solyanik I have updated the description.

Copy link
Member

@LeafShi1 LeafShi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Tanya-Solyanik Tanya-Solyanik removed 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) untriaged The team needs to look at this issue in the next triage labels Jan 6, 2025
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Shound this change be added to the servicing PR?

@Tanya-Solyanik Tanya-Solyanik added the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Jan 6, 2025
@Epica3055 Epica3055 merged commit 034543a into dotnet:main Jan 7, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Jan 7, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Jan 7, 2025
ricardobossan pushed a commit to ricardobossan/winforms that referenced this pull request Jan 9, 2025
…olour contrast is less than 4.5:1 in Normal Mode and HC Desert mode (dotnet#12682)
@Epica3055
Copy link
Member Author

@Tanya-Solyanik

I don't think this is necessary since this is a minor issue and there is no customer report.
But I don't mind doing it if you insist. 😁

@merriemcgaw what do you think?

@merriemcgaw
Copy link
Member

@Epica3055 I think you're right. We can always bring it back if a customer specifically asks for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants