- Notifications
You must be signed in to change notification settings - Fork22
fix(button): increase hover contrast#666
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Only secondary/plain, as primary uses white text color.
github-actionsbot commentedAug 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
8dd960c was deployed to:https://fred-pr666.review.mdn.allizom.net/ |
OnkarRuikar commentedAug 31, 2025
Please update the plain button hover contrast in dark mode as well: /* Plain */ &[data-variant="plain"] { &:hover {-- background-color: light-dark(var(--color-gray-80), var(--color-gray-20));++ background-color: light-dark(var(--color-gray-80), var(--color-gray-40)); }The current hover is almost not noticeable. In the following video, the button_contrast-2025-08-31_11.06.45.mp4In the above video, the buttons are zoomed in, but in the normal case hover color change is not visible. |
caugner commentedSep 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The suggestion passes WCAG AAA: @mdn/content-team Do you approve the changes in this PR, and/or Onkar's suggestion? |
Rumyra commentedSep 2, 2025
Yes approve both 👍 |
caugner commentedSep 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I looked into applying@OnkarRuikar's suggestion, but noticed that all neutral dark variants have similar contrast issues, see the following screenshots, with hover on the middle button: ![]() ![]() ![]() ![]() Here's how these would look with increased contrast (1120399): ![]() ![]() ![]() ![]() @Rumyra Does that look right? Edit: Contrast ratios are12.35:1 and7.39:1 respectively, both passing WCAG AAA. |
OnkarRuikar commentedSep 3, 2025
@caugner thanks for increasing the scope of the fix. The dark theme is looking good.
|
caugner commentedSep 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
caugner commentedSep 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm thinking that we shouldn't mix these changes up in a single PR:
|
OnkarRuikar commentedSep 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There are other places that could use more hover contrast: hoverContrast.mp4Also include the search box suggestion list and left sidebar list. In right sidebar in-viewport items could use more prominent blue background. |











Uh oh!
There was an error while loading.Please reload this page.
Description
Increases the contrast between the background color with/without hover.
Motivation
Increase contrast:
Additional details
Related issues and pull requests
Fixes#653.