Opened 12 months ago
Closed 11 months ago
#60140 closed defect (bug) (fixed)
Copy buttons: Insufficient color contrast ratio for the 'Copied!' text
Reported by: | afercia | Owned by: | afercia |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-screenshots has-patch |
Focuses: | accessibility | Cc: |
Description
In a few places in the admin interface, WordPress uses a 'Copy' button to allow users to copy to the clipboard some values like URLs or the Site Health info.
After the values have been copied, a 'Copied!' text appears to provide a confirmation message.
The text color is a #008a20
green. When it is used against the default light grey background #f0f0f1
the contrast ratio is only 3.96:1. It should be at least 4.5:1.
See https://jdlsn.com/color/?type=hex&color=008a20&color2=f0f0f1
When used against a white background, the contrast is okay.
Attachments (3)
Change History (9)
#2
in reply to:
↑ 1
@
11 months ago
- Resolution set to wontfix
- Status changed from new to closed
Replying to afercia:
I'm not sure the text needs to be green in the first place. I'd just use the default dark grey text color.
Why do you think it? It is standart color schema for WP. Anyway you can add to your admin theme css like to:
.site-health-copy-buttons .copy-button-wrapper span.success {color:#3c434a!important}
How to add your own css in WP dashboard?
Go to WordPress Admin > Appearance (kost) > Admin CSS MU and add the custom CSS you want
#3
@
11 months ago
- Resolution wontfix deleted
- Status changed from closed to reopened
The text needs to have a minimum contrast of 4.5:1 against the background, whether the text is green or gray.
The palette's next darkest green (#007017
Green 60) would have a 5.54:1 contrast ratio against #f0f0f1
.
#4
@
11 months ago
- Keywords has-patch added; needs-patch removed
#51355 switched both Media "Copied" messages to green for consistency with Privacy (#44588) and Site Health (#46573). Changing the color to gray would require design feedback and a new decision.
In addition to making the green pass minimum contrast against the #f0f0f1
background at 5.54:1, Green 60 would increase contrast against white from barely passing (4.51:1) up to 6.3:1.
I'm not sure the text needs to be green in the first place. I'd just use the default dark grey text color.