Privacy: Fix the color contrast of request row action text - #12842
Privacy: Fix the color contrast of request row action text#12842jigneshbhavani wants to merge 1 commit into
Conversation
The Export and Erase Personal Data tables render progress and result text inside the row actions, where `.privacy_requests .row-actions` set the color to #787c82. Against the #fff cell background that is 4.19:1, below the 4.5:1 minimum for normal text. The affected strings are "Downloading data...", "Download failed.", "Erasing data...", "Erasure completed." and "Force erasure has failed.", along with the separators between the actions. The override is not needed. Every other list table in the admin uses the standard `.row-actions` color, #646970, which is 5.53:1 against the same background. Removing the privacy specific rule brings these two tables in line with the rest of the admin without introducing another color. The color was never chosen for its contrast. It arrived as #72777c in [46264] and became #787c82 in [50025], when admin colors were standardized on a single palette. Props bejignesh, afercia, joedolson. Fixes #65807.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
The Export and Erase Personal Data tables render their progress and result text inside the row actions, where
forms.csssets a privacy specific color:Against the
#fffcell background that is 4.19:1, below the 4.5:1 minimum for normal text. The strings are built into$row_actionsin the two list tables, so they inherit a color meant for links:This removes the override so the text inherits the standard
.row-actionscolor,#646970fromlist-tables.css, which is 5.53:1 against the same background. Every other list table in the admin already uses it, so this introduces no new color, which is what the ticket asks for.The color was never chosen for its contrast. It arrived as
#72777cin [46264] and became#787c82in [50025], when admin colors were standardized on a single palette.Measured, before and after
Computed styles on the rendered screens at
/wp-admin/export-personal-data.phpand/wp-admin/erase-personal-data.php, with requests present in all four states (pending, confirmed, failed, completed). The row action states that are hidden until JS runs were unhidden in order to measure them.Auditing every text bearing element inside both tables: 7 failures before, 0 after. The lowest remaining ratio in either table is 4.73:1, the
#d63638"Failed" status label, which passes.Note the ticket names two strings; there are five. "Force erasure has failed." and "Download failed." come from the same rule, as do the
|separators.On the striping question
The ticket asks whether zebra striping puts this text on a gray background, which would lower the ratio further. It does not. The table carries the
stripedclass, butforms.cssoverrides the backgrounds, and measured on the rendered page every text bearing cell computes to#fffin all four request states. The only gray is#f6f7f7ontd.check-columnof a failed request, which contains just the checkbox and no text. So 4.19:1 was the worst case, not the best case.Testing
forms-rtl.cssis generated at build time and is not tracked.Trac ticket: https://core.trac.wordpress.org/ticket/65807
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Drafting the patch and this description. I measured the contrast ratios from computed styles on the rendered admin screens before and after the change, created privacy requests in all four states to cover every row variant, audited every text bearing element in both tables rather than only the strings named in the ticket, checked the striping question against the rendered page, traced the color back through [46264] and [50025], and I take responsibility for the result.