Improve the "Add title..." and "Write" placeholders color contrast ratio #1302
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
The new "Write placeholders" have an insufficient color contrast ratio. To be compliant with the WCAG at level AA, text should have a contrast ratio of at least 4.5:1 with its background.
If I'm not wrong, the current color is #ccd0d4 and gives a result of:
Luminosity Contrast Ratio: 1.55:1
https://jdlsn.com/color/?type=hex&color=ccd0d4&color2=ffffff
The only exception is when the text is bigger than approximately 24px or bigger than approximately 18.5px and bold: in this case, the required contrast ratio threshold lowers to 3:1.
The "Add title..." placeholder has a (computed) font-size of 32px but the color contrast ratio is just 2.93:1 and should be at least 3:1.
Note on colors:
I guess colors should be picked up from the new ones designed by @hugobaeta, https://codepen.io/hugobaeta/pen/grJjVp not sure
#ccd0d4
is there. I see the implementation sometimes uses a CSS generated content and sometimes a placeholder attribute, that's perfectly fine but worth nothing the current styling for the placeholder attribute is overriding the rules provided by core:they were introduced in https://core.trac.wordpress.org/changeset/36619 for good reasons. Maybe worth considering updating the core rules with a new (and accessible) shade of gray.
The text was updated successfully, but these errors were encountered: