Conversation
Only secondary/plain, as primary uses white text color.
|
8dd960c was deployed to: https://fred-pr666.review.mdn.allizom.net/ |
|
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. |
The suggestion passes WCAG AAA: @mdn/content-team Do you approve the changes in this PR, and/or Onkar's suggestion? |
|
Yes approve both 👍 |
|
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 are 12.35:1 and 7.39:1 respectively, both passing WCAG AAA. |
|
@caugner thanks for increasing the scope of the fix. The dark theme is looking good.
|
|
I'm thinking that we shouldn't mix these changes up in a single PR:
|
|
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. |







Description
Increases the contrast between the background color with/without hover.
Motivation
Increase contrast:
Additional details
Related issues and pull requests
Fixes #653.