Opened 5 weeks ago
Closed 5 weeks ago
#64811 closed defect (bug) (fixed)
Zero comment notification in admin toolbar has insufficient color contrast
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | 3.8 |
| Component: | Toolbar | Keywords: | has-patch commit |
| Focuses: | ui, accessibility, css, administration | Cc: |
Description
Hi,
When no comment is to be validated in the WordPress dashboard, the figure "0" appears next to the comment icon.
This number has an opacity of .5 applied because of the class .count-0.
The result is an insufficient color contrast to reach WCAG AA standard.
This was tested with the Modern WordPress User theme (but insufficient contrast was also noticed with other themes, like Fresh, Light, and so on).
Different solutions:
- remove the .count-0 class, so that the color isn't altered when no comments have to be reviewed.
- increase the opacity to .7 which is enough to get a color contrast of over 4.5, while still keeping a slight visual difference.
Attachments (3)
Change History (10)
#2
@
5 weeks ago
- Milestone changed from Awaiting Review to 7.0
- Type changed from enhancement to defect (bug)
This ticket was mentioned in PR #11186 on WordPress/wordpress-develop by @hbhalodia.
5 weeks ago
#3
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/64811
- Remove the whole CSS as no need to add opacity.
- Fix the color contrast issue.
## Use of AI Tools
#4
@
5 weeks ago
- Keywords commit added
The WCAG Color contrast checker Chrome extension's foreground color calculations seem inaccurate for this element; Firefox tells me the ratios are 5.12:1 in Modern and 4.54:1 in Fresh.
However, in the :focus and :hover states, half-opacity is almost guaranteed to have insufficient contrast. The styles theoretically could change opacity on those states, but I like the simplicity of PR 11186.
The count-0 class remains on the element, so anyone who chooses can still change the opacity or hide the zero (or use :not(.count-0) to call attention to non-zero numbers).
Inspect tool : focus on the .count-0 class