Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/fredPublic

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

Draft
caugner wants to merge5 commits intomain
base:main
Choose a base branch
Loading
from653-increase-positive-button-contrast

Conversation

@caugner
Copy link
Contributor

@caugnercaugner commentedAug 29, 2025
edited
Loading

Description

Increases the contrast between the background color with/without hover.

Motivation

Increase contrast:

Additional details

YesNo
Beforeimageimage
Afterimageimage

Related issues and pull requests

Fixes#653.

bsmth reacted with hooray emoji
Only secondary/plain, as primary uses white text color.
@github-actions
Copy link
Contributor

github-actionsbot commentedAug 29, 2025
edited
Loading

@caugnercaugner changed the titlefix(button): increase contrast for light positive actionfix(button): increase contrast for light action buttonsAug 29, 2025
@caugnercaugner marked this pull request as draftAugust 29, 2025 12:05
@caugnercaugner marked this pull request as ready for reviewAugust 29, 2025 12:13
@OnkarRuikar
Copy link
Contributor

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, theClear button has the above change:

button_contrast-2025-08-31_11.06.45.mp4

In the above video, the buttons are zoomed in, but in the normal case hover color change is not visible.

caugner reacted with eyes emoji

@caugnercaugner requested a review fromLeoMcASeptember 1, 2025 12:50
@caugner
Copy link
ContributorAuthor

caugner commentedSep 1, 2025
edited
Loading

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 suggestion passes WCAG AAA:7.14:17.39:1

@mdn/content-team Do you approve the changes in this PR, and/or Onkar's suggestion?

caugner reacted with eyes emoji

@caugnercaugner added the needs content decisionThis issue needs a decision from the MDN Content Team before it can proceed. labelSep 1, 2025
@Rumyra
Copy link
Contributor

Yes approve both 👍

caugner reacted with heart emoji

@caugner
Copy link
ContributorAuthor

caugner commentedSep 3, 2025
edited
Loading

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:

imageimageimageimage

Here's how these would look with increased contrast (1120399):

imageimageimageimage

@Rumyra Does that look right?

Edit: Contrast ratios are12.35:1 and7.39:1 respectively, both passing WCAG AAA.

OnkarRuikar and pransh15 reacted with thumbs up emoji

@OnkarRuikar
Copy link
Contributor

@caugner thanks for increasing the scope of the fix. The dark theme is looking good.

img
In the Light theme could you increase darkness a bit more? I am using a LED screen and the hovered unhovered difference is not that stark.

@caugner
Copy link
ContributorAuthor

caugner commentedSep 3, 2025
edited
Loading

In the Light theme could you increase darkness a bit more?

I assume you're referring to this one:

image

Here's how this looks with increased "hover contrast" (34c264c):

image

Contrast is7.39:1 (previously13.25:1), still passing WCAG AAA.

OnkarRuikar reacted with thumbs up emoji

@caugnercaugner changed the titlefix(button): increase contrast for light action buttonsfix(button): increase hover contrastSep 3, 2025
@caugner
Copy link
ContributorAuthor

caugner commentedSep 3, 2025
edited
Loading

I'm thinking that we shouldn't mix these changes up in a single PR:

  • The original changes areincreasing contrast between text and background color.
  • The other changes are decreasing contrast between text and background color, to increase contrast between background color with/without hover.

@OnkarRuikar
Copy link
Contributor

OnkarRuikar commentedSep 3, 2025
edited
Loading

There are other places that could use more hover contrast:

hoverContrast.mp4

Also include the search box suggestion list and left sidebar list. In right sidebar in-viewport items could use more prominent blue background.

@caugnercaugner marked this pull request as draftSeptember 3, 2025 13:52
@globauglobau removed the needs content decisionThis issue needs a decision from the MDN Content Team before it can proceed. labelSep 10, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@LeoMcALeoMcAAwaiting requested review from LeoMcA

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Insufficient color contrast in footer

4 participants

@caugner@OnkarRuikar@Rumyra@globau

[8]ページ先頭

©2009-2025 Movatter.jp